diff options
author | Danny van Bruggen <hexagonaal@gmail.com> | 2017-11-05 16:00:06 +0100 |
---|---|---|
committer | Danny van Bruggen <hexagonaal@gmail.com> | 2017-11-05 16:00:06 +0100 |
commit | cace45b6d73919f9f41db3f7897503a7c255a9e0 (patch) | |
tree | 79853199e0a56173525a9e69aefd55fdaf3dfa93 | |
parent | f94885659b53f119b444a9783e842862f0905811 (diff) | |
download | javaparser-cace45b6d73919f9f41db3f7897503a7c255a9e0.tar.gz |
Run new Javadoc algorithm on codebase
20 files changed, 59 insertions, 51 deletions
diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/ImportDeclaration.java b/javaparser-core/src/main/java/com/github/javaparser/ast/ImportDeclaration.java index 7f62115b7..408295cb8 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/ImportDeclaration.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/ImportDeclaration.java @@ -38,9 +38,9 @@ import com.github.javaparser.TokenRange; * <br/><code>import com.github.javaparser.JavaParser;</code> * <br/><code>import com.github.javaparser.*;</code> * <br/><code>import com.github.javaparser.JavaParser.*; </code> - * <br/><code>import static com.github.javaparser.JavaParser.*;</code> - * <br/><code>import static com.github.javaparser.JavaParser.parse;</code> - * + * <br/><code>import static com.github.javaparser.JavaParser.*;</code> + * <br/><code>import static com.github.javaparser.JavaParser.parse;</code> + * * <p>The name does not include the asterisk or the static keyword.</p> * @author Julio Vilmar Gesser */ diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/Node.java b/javaparser-core/src/main/java/com/github/javaparser/ast/Node.java index 419180821..423f8978c 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/Node.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/Node.java @@ -624,7 +624,7 @@ public abstract class Node implements Cloneable, HasParentNode<Node>, Visitable, /** * @return whether this node was successfully parsed or not. - * If it was not, only the range and tokenRange fields will be valid. + * If it was not, only the range and tokenRange fields will be valid. */ public Parsedness getParsed() { return parsed; diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/body/CallableDeclaration.java b/javaparser-core/src/main/java/com/github/javaparser/ast/body/CallableDeclaration.java index 5978ca11a..42ba46698 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/body/CallableDeclaration.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/body/CallableDeclaration.java @@ -399,8 +399,8 @@ public abstract class CallableDeclaration<T extends CallableDeclaration<?>> exte return Optional.ofNullable(receiverParameter); } - @SuppressWarnings("unchecked") @Generated("com.github.javaparser.generator.core.node.PropertyGenerator") + @SuppressWarnings("unchecked") public T setReceiverParameter(final ReceiverParameter receiverParameter) { if (receiverParameter == this.receiverParameter) { return (T) this; diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/body/FieldDeclaration.java b/javaparser-core/src/main/java/com/github/javaparser/ast/body/FieldDeclaration.java index ec12ed111..103d24fdc 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/body/FieldDeclaration.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/body/FieldDeclaration.java @@ -64,7 +64,7 @@ import java.util.function.Consumer; * * <br/>All annotations preceding the type will be set on this object, not on the type. * JavaParser doesn't know if it they are applicable to the method or the type. - * + * * @author Julio Vilmar Gesser */ public final class FieldDeclaration extends BodyDeclaration<FieldDeclaration> implements NodeWithJavadoc<FieldDeclaration>, NodeWithVariables<FieldDeclaration>, NodeWithAccessModifiers<FieldDeclaration>, NodeWithStaticModifier<FieldDeclaration>, NodeWithFinalModifier<FieldDeclaration>, Resolvable<ResolvedFieldDeclaration> { diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/body/MethodDeclaration.java b/javaparser-core/src/main/java/com/github/javaparser/ast/body/MethodDeclaration.java index 8b7c117b1..b42174a17 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/body/MethodDeclaration.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/body/MethodDeclaration.java @@ -56,7 +56,7 @@ import java.util.function.Consumer; * * <br/>All annotations preceding the return type will be set on this object, not on the return type. * JavaParser doesn't know if it they are applicable to the method or the type. - * + * * @author Julio Vilmar Gesser */ public final class MethodDeclaration extends CallableDeclaration<MethodDeclaration> implements NodeWithType<MethodDeclaration, Type>, NodeWithOptionalBlockStmt<MethodDeclaration>, NodeWithJavadoc<MethodDeclaration>, NodeWithDeclaration, NodeWithSimpleName<MethodDeclaration>, NodeWithParameters<MethodDeclaration>, NodeWithThrownExceptions<MethodDeclaration>, NodeWithTypeParameters<MethodDeclaration>, NodeWithAccessModifiers<MethodDeclaration>, NodeWithAbstractModifier<MethodDeclaration>, NodeWithStaticModifier<MethodDeclaration>, NodeWithFinalModifier<MethodDeclaration>, NodeWithStrictfpModifier<MethodDeclaration>, Resolvable<ResolvedMethodDeclaration> { @@ -86,7 +86,9 @@ public final class MethodDeclaration extends CallableDeclaration<MethodDeclarati this(null, modifiers, annotations, typeParameters, type, name, parameters, thrownExceptions, body, receiverParameter); } - /** @deprecated this constructor allows you to set "isDefault", but this is no longer a field of this node, but simply one of the modifiers. Use setDefault(boolean) or add DEFAULT to the modifiers set. */ + /** + * @deprecated this constructor allows you to set "isDefault", but this is no longer a field of this node, but simply one of the modifiers. Use setDefault(boolean) or add DEFAULT to the modifiers set. + */ @Deprecated public MethodDeclaration(final EnumSet<Modifier> modifiers, final NodeList<AnnotationExpr> annotations, final NodeList<TypeParameter> typeParameters, final Type type, final SimpleName name, final boolean isDefault, final NodeList<Parameter> parameters, final NodeList<ReferenceType> thrownExceptions, final BlockStmt body) { this(null, modifiers, annotations, typeParameters, type, name, parameters, thrownExceptions, body, null); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/body/Parameter.java b/javaparser-core/src/main/java/com/github/javaparser/ast/body/Parameter.java index 3a785ec9c..ad9bb0ef4 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/body/Parameter.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/body/Parameter.java @@ -53,7 +53,7 @@ import com.github.javaparser.resolution.declarations.ResolvedParameterDeclaratio * <br/>Note that <a href="https://en.wikipedia.org/wiki/Parameter_(computer_programming)#Parameters_and_arguments">parameters * are different from arguments.</a> <br/>"String x" and "float y" are the parameters in <code>int abc(String x, float * y) {...}</code> - * + * * <br/>All annotations preceding the type will be set on this object, not on the type. * JavaParser doesn't know if it they are applicable to the parameter or the type. * diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/body/ReceiverParameter.java b/javaparser-core/src/main/java/com/github/javaparser/ast/body/ReceiverParameter.java index cc3123643..b0038e1eb 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/body/ReceiverParameter.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/body/ReceiverParameter.java @@ -48,7 +48,7 @@ import com.github.javaparser.metamodel.ReceiverParameterMetaModel; /** * The rather obscure <a href="http://blog.joda.org/2015/12/explicit-receiver-parameters.html">"receiver parameter" feature of Java</a>. - * + * * <br/>All annotations preceding the type will be set on this object, not on the type. * JavaParser doesn't know if it they are applicable to the receiver parameter or the type. * diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/ArrayCreationExpr.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/ArrayCreationExpr.java index 054723734..a32d7e1f6 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/ArrayCreationExpr.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/ArrayCreationExpr.java @@ -44,7 +44,7 @@ import java.util.function.Consumer; /** * <code>new int[5][4][][]</code> or <code>new int[][]{{1},{2,3}}</code>. - * + * * <br/>"int" is the element type. * <br/>All the brackets are stored in the levels field, from left to right. * diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/MethodReferenceExpr.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/MethodReferenceExpr.java index 81058aa41..644e54336 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/MethodReferenceExpr.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/MethodReferenceExpr.java @@ -48,8 +48,8 @@ import java.util.function.Consumer; * it can be "new". * <br/>In <code>System.out::println;</code> the scope is System.out and the identifier is "println" * <br/><code>(test ? stream.map(String::trim) : stream)::toArray;</code> - * <br/>In <code>Bar<String>::<Integer>new</code> the String type argument is on the scope, - * and the Integer type argument is on this MethodReferenceExpr. + * <br/>In <code>Bar<String>::<Integer>new</code> the String type argument is on the scope, + * and the Integer type argument is on this MethodReferenceExpr. * * @author Raquel Pau */ diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/ForStmt.java b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/ForStmt.java index db87acc36..bb3c079cb 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/ForStmt.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/ForStmt.java @@ -42,8 +42,8 @@ import java.util.function.Consumer; /** * A classic for statement. - * <br/>In <code>for(int a=3,b==5; a<99; a++) { ... }</code> the intialization is int a=3,b=5, - * compare is b==5, update is a++, and the statement or block statement following it is in body. + * <br/>In <code>for(int a=3,b==5; a<99; a++) { ... }</code> the intialization is int a=3,b=5, + * compare is b==5, update is a++, and the statement or block statement following it is in body. * * @author Julio Vilmar Gesser */ diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/LocalClassDeclarationStmt.java b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/LocalClassDeclarationStmt.java index a0338cf04..e40769e6a 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/LocalClassDeclarationStmt.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/LocalClassDeclarationStmt.java @@ -35,7 +35,7 @@ import com.github.javaparser.TokenRange; import java.util.function.Consumer; /** - * A class declaration inside a method. + * A class declaration inside a method. * Note that JavaParser wil parse interface declarations too, but these are not valid Java code. * <p> * <br/><code>class X { void m() { <b>class Y { }</b> } }</code> diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/SwitchEntryStmt.java b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/SwitchEntryStmt.java index a6a19d89f..e6157a822 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/SwitchEntryStmt.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/SwitchEntryStmt.java @@ -43,12 +43,12 @@ import java.util.function.Consumer; * One case in a switch statement. * <br/><pre> * switch (i) { - * case 1: - * case 2: - * System.out.println(444); - * break; - * default: - * System.out.println(0); + * case 1: + * case 2: + * System.out.println(444); + * break; + * default: + * System.out.println(0); * } * </pre> * This contains three SwitchEntryStmts. diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/SynchronizedStmt.java b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/SynchronizedStmt.java index 730fb37fe..be2c40c26 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/SynchronizedStmt.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/SynchronizedStmt.java @@ -39,7 +39,7 @@ import java.util.function.Consumer; /** * Usage of the synchronized keyword. - * <br/>In <code>synchronized (a123) { ... }</code> the expression is a123 and { ... } is the body + * <br/>In <code>synchronized (a123) { ... }</code> the expression is a123 and { ... } is the body * * @author Julio Vilmar Gesser */ diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/TryStmt.java b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/TryStmt.java index 1cc5eee5d..a96cec9cc 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/TryStmt.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/TryStmt.java @@ -43,11 +43,11 @@ import java.util.function.Consumer; * <h2>Java 1-6</h2> * <pre> * try { - * // ... + * // ... * } catch (IOException e) { - * // ... + * // ... * } finally { - * // ... + * // ... * } * </pre> * In this code, "// do things" is the content of the tryBlock, there is one catch clause that catches IOException e, @@ -57,34 +57,34 @@ import java.util.function.Consumer; * <h2>Java 7-8</h2> * <pre> * try (InputStream i = new FileInputStream("file")) { - * // ... + * // ... * } catch (IOException|NullPointerException e) { - * // ... + * // ... * } finally { - * // ... + * // ... * } * </pre> * Java 7 introduced two things: * <ul> - * <li>Resources can be specified after "try", but only variable declarations (VariableDeclarationExpr.)</li> - * <li>A single catch can catch multiple exception types. This uses the IntersectionType.</li> + * <li>Resources can be specified after "try", but only variable declarations (VariableDeclarationExpr.)</li> + * <li>A single catch can catch multiple exception types. This uses the IntersectionType.</li> * </ul> * <h2>Java 9+</h2> * <pre> * try (r) { - * // ... + * // ... * } catch (IOException|NullPointerException e) { - * // ... + * // ... * } finally { - * // ... + * // ... * } * </pre> * Java 9 finishes resources: you can now refer to a resource that was declared somewhere else. * The following types are allowed: * <ul> - * <li>VariableDeclarationExpr: "X x = new X()" like in Java 7-8.</li> - * <li>NameExpr: "a".</li> - * <li>FieldAccessExpr: "x.y.z", "super.test" etc.</li> + * <li>VariableDeclarationExpr: "X x = new X()" like in Java 7-8.</li> + * <li>NameExpr: "a".</li> + * <li>FieldAccessExpr: "x.y.z", "super.test" etc.</li> * </ul> * * @author Julio Vilmar Gesser diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/type/ArrayType.java b/javaparser-core/src/main/java/com/github/javaparser/ast/type/ArrayType.java index 2850800a8..45ccd1263 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/type/ArrayType.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/type/ArrayType.java @@ -58,8 +58,12 @@ public final class ArrayType extends ReferenceType implements NodeWithAnnotation */ public enum Origin { - /** The [] were found on the name, like "int a[]" or "String abc()[][]" */ - NAME, /** The [] were found on the type, like "int[] a" or "String[][] abc()" */ + /** + * The [] were found on the name, like "int a[]" or "String abc()[][]" + */ + NAME, /** + * The [] were found on the type, like "int[] a" or "String[][] abc()" + */ TYPE } diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/type/Type.java b/javaparser-core/src/main/java/com/github/javaparser/ast/type/Type.java index 7ce8ee02f..12405896d 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/type/Type.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/type/Type.java @@ -51,7 +51,7 @@ public abstract class Type extends Node implements Resolvable<Object> { /** * Several sub classes do not support annotations. * This is a support constructor for them. - */ + */ protected Type(TokenRange range) { this(range, new NodeList<>()); } diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/type/UnionType.java b/javaparser-core/src/main/java/com/github/javaparser/ast/type/UnionType.java index d05d42502..6feeada4d 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/type/UnionType.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/type/UnionType.java @@ -50,13 +50,13 @@ import java.util.function.Consumer; * <h2>Java 7+</h2> * As of Java 7 it is used in catch clauses. * <pre><code> - * try { - * ... - * } catch(<b>IOException | NullPointerException ex</b>) { - * ... - * } + * try { + * ... + * } catch(<b>IOException | NullPointerException ex</b>) { + * ... + * } * </pre> - * + * * The types that make up the union type are its "elements" */ public final class UnionType extends Type implements NodeWithAnnotations<UnionType> { diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/type/WildcardType.java b/javaparser-core/src/main/java/com/github/javaparser/ast/type/WildcardType.java index 03d04685b..984222885 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/type/WildcardType.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/type/WildcardType.java @@ -257,7 +257,9 @@ public final class WildcardType extends Type implements NodeWithAnnotations<Wild return super.replace(node, replacementNode); } - /**This constructor is used by the parser and is considered private.*/ + /** + * This constructor is used by the parser and is considered private. + */ @Generated("com.github.javaparser.generator.core.node.MainConstructorGenerator") public WildcardType(TokenRange tokenRange, ReferenceType extendedType, ReferenceType superType) { super(tokenRange); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/visitor/ModifierVisitor.java b/javaparser-core/src/main/java/com/github/javaparser/ast/visitor/ModifierVisitor.java index 0a8619055..ae82fc282 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/visitor/ModifierVisitor.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/visitor/ModifierVisitor.java @@ -41,9 +41,9 @@ import java.util.Optional; * to be changed. To do that just extend this class and override the methods * from the nodes who needs to be changed, returning the changed node. * Returning null will remove the node. - * - * If a node is removed that was required in its parent node, - * the parent node will be removed too. + * + * If a node is removed that was required in its parent node, + * the parent node will be removed too. * * @author Julio Vilmar Gesser */ diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/visitor/VoidVisitorAdapter.java b/javaparser-core/src/main/java/com/github/javaparser/ast/visitor/VoidVisitorAdapter.java index 6ece2a302..d0cfbe401 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/visitor/VoidVisitorAdapter.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/visitor/VoidVisitorAdapter.java @@ -34,7 +34,7 @@ import javax.annotation.Generated; /** * A visitor that returns nothing, and has a default implementation for all its visit * methods that simply visit their children in an unspecified order. - * + * * @author Julio Vilmar Gesser */ public abstract class VoidVisitorAdapter<A> implements VoidVisitor<A> { |