diff options
Diffstat (limited to 'javaparser-core/src/main/java')
101 files changed, 17 insertions, 1232 deletions
diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/CompilationUnit.java b/javaparser-core/src/main/java/com/github/javaparser/ast/CompilationUnit.java index 6f2fbf7a1..1dba2b45d 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/CompilationUnit.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/CompilationUnit.java @@ -21,7 +21,6 @@ package com.github.javaparser.ast; -import static com.github.javaparser.Position.pos; import static com.github.javaparser.ast.internal.Utils.ensureNotNull; import java.util.Arrays; @@ -76,15 +75,6 @@ public final class CompilationUnit extends Node { setTypes(types); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public CompilationUnit(int beginLine, int beginColumn, int endLine, int endColumn, PackageDeclaration pakage, - List<ImportDeclaration> imports, List<TypeDeclaration<?>> types) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), pakage, imports, types); - } - public CompilationUnit(Range range, PackageDeclaration pakage, List<ImportDeclaration> imports, List<TypeDeclaration<?>> types) { super(range); @@ -244,8 +234,8 @@ public final class CompilationUnit extends Node { * <b>This method check if no import with the same name is already in the list</b> * * @param name the import name - * @param isStatic - * @param isAsterisk + * @param isStatic is it an "import static" + * @param isAsterisk does the import end with ".*" * @return this, the {@link CompilationUnit} */ public CompilationUnit addImport(String name, boolean isStatic, boolean isAsterisk) { 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 ce5039bca..628200352 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 @@ -21,14 +21,11 @@ package com.github.javaparser.ast; -import com.github.javaparser.Position; import com.github.javaparser.Range; import com.github.javaparser.ast.expr.NameExpr; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * <p> * This class represents a import declaration or an empty import declaration. Imports are optional for the @@ -56,14 +53,6 @@ public final class ImportDeclaration extends Node { asterisk = false; } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - private ImportDeclaration(int beginLine, int beginColumn, int endLine, int endColumn) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn))); - } - private ImportDeclaration(Range range) { super(range); this.isEmptyImportDeclaration = true; @@ -80,15 +69,6 @@ public final class ImportDeclaration extends Node { /** * Create an empty import declaration specifying its position. - * @deprecated prefer using Range objects. - */ - @Deprecated - public static ImportDeclaration createEmptyDeclaration(int beginLine, int beginColumn, int endLine, int endColumn){ - return new ImportDeclaration(beginLine, beginColumn, endLine, endColumn); - } - - /** - * Create an empty import declaration specifying its position. */ public static ImportDeclaration createEmptyDeclaration(Range range){ return new ImportDeclaration(range); @@ -101,14 +81,6 @@ public final class ImportDeclaration extends Node { this.isEmptyImportDeclaration = false; } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public ImportDeclaration(int beginLine, int beginColumn, int endLine, int endColumn, NameExpr name, boolean isStatic, boolean isAsterisk) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), name, isStatic, isAsterisk); - } - public ImportDeclaration(Range range, NameExpr name, boolean isStatic, boolean isAsterisk) { super(range); setAsterisk(isAsterisk); 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 d202d213e..fe0e83cf0 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 @@ -21,8 +21,6 @@ package com.github.javaparser.ast; -import static com.github.javaparser.Position.pos; - import java.util.LinkedList; import java.util.List; @@ -65,14 +63,6 @@ public abstract class Node implements Cloneable { this(Range.UNKNOWN); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public Node(final int beginLine, final int beginColumn, final int endLine, final int endColumn) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn))); - } - public Node(Range range) { this.range = range; } @@ -105,28 +95,6 @@ public abstract class Node implements Cloneable { public abstract <A> void accept(VoidVisitor<A> v, A arg); /** - * Return the begin column of this node. - * - * @return the begin column of this node - * @deprecated prefer using Range objects. - */ - @Deprecated - public final int getBeginColumn() { - return range.begin.column; - } - - /** - * Return the begin line of this node. - * - * @return the begin line of this node - * @deprecated prefer using Range objects. - */ - @Deprecated - public final int getBeginLine() { - return range.begin.line; - } - - /** * This is a comment associated with this node. * * @return comment property @@ -145,52 +113,6 @@ public abstract class Node implements Cloneable { } /** - * Return the end column of this node. - * - * @return the end column of this node - * @deprecated prefer using Range objects. - */ - @Deprecated - public final int getEndColumn() { - return range.end.column; - } - - /** - * Return the end line of this node. - * - * @return the end line of this node - * @deprecated prefer using Range objects. - */ - @Deprecated - public final int getEndLine() { - return range.end.line; - } - - /** - * Sets the begin column of this node. - * - * @param beginColumn - * the begin column of this node - * @deprecated prefer using Range objects. - */ - @Deprecated - public final void setBeginColumn(final int beginColumn) { - range = range.withBeginColumn(beginColumn); - } - - /** - * Sets the begin line of this node. - * - * @param beginLine - * the begin line of this node - * @deprecated prefer using Range objects. - */ - @Deprecated - public final void setBeginLine(final int beginLine) { - range = range.withBeginLine(beginLine); - } - - /** * The begin position of this node in the source file. */ public Position getBegin() { @@ -280,30 +202,6 @@ public abstract class Node implements Cloneable { } /** - * Sets the end column of this node. - * - * @param endColumn - * the end column of this node - * @deprecated prefer using Range objects. - */ - @Deprecated - public final void setEndColumn(final int endColumn) { - range = range.withEndColumn(endColumn); - } - - /** - * Sets the end line of this node. - * - * @param endLine - * the end line of this node - * @deprecated prefer using Range objects. - */ - @Deprecated - public final void setEndLine(final int endLine) { - range = range.withEndLine(endLine); - } - - /** * Return the String representation of this node. * * @return the String representation of this node @@ -439,26 +337,10 @@ public abstract class Node implements Cloneable { public static final int ABSOLUTE_BEGIN_LINE = -1; public static final int ABSOLUTE_END_LINE = -2; - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public boolean isPositionedAfter(int line, int column) { - return range.isAfter(pos(line, column)); - } - public boolean isPositionedAfter(Position position) { return range.isAfter(position); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public boolean isPositionedBefore(int line, int column) { - return range.isBefore(pos(line, column)); - } - public boolean isPositionedBefore(Position position) { return range.isBefore(position); } diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/PackageDeclaration.java b/javaparser-core/src/main/java/com/github/javaparser/ast/PackageDeclaration.java index 0e4eea7a5..99480c9ca 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/PackageDeclaration.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/PackageDeclaration.java @@ -63,14 +63,6 @@ public final class PackageDeclaration extends Node { setName(name); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public PackageDeclaration(int beginLine, int beginColumn, int endLine, int endColumn, List<AnnotationExpr> annotations, NameExpr name) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), annotations, name); - } - public PackageDeclaration(Range range, List<AnnotationExpr> annotations, NameExpr name) { super(range); setAnnotations(annotations); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/TypeParameter.java b/javaparser-core/src/main/java/com/github/javaparser/ast/TypeParameter.java index f0bebcd1c..e3191bc1b 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/TypeParameter.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/TypeParameter.java @@ -61,28 +61,17 @@ public final class TypeParameter extends Node implements NodeWithName<TypeParame setTypeBound(typeBound); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public TypeParameter(final int beginLine, final int beginColumn, final int endLine, final int endColumn, - final String name, final List<ClassOrInterfaceType> typeBound) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), name, typeBound); - } - public TypeParameter(Range range, final String name, final List<ClassOrInterfaceType> typeBound) { super(range); setName(name); setTypeBound(typeBound); } - public TypeParameter(int beginLine, int beginColumn, int endLine, - int endColumn, String name, List<ClassOrInterfaceType> typeBound, List<AnnotationExpr> annotations) { - this(beginLine, beginColumn, endLine, endColumn, name, typeBound); - setName(name); - setTypeBound(typeBound); - setAnnotations(annotations); - } + public TypeParameter(Range range, String name, List<ClassOrInterfaceType> typeBound, List<AnnotationExpr> annotations) { + this(range, name, typeBound); + setTypeBound(typeBound); + setAnnotations(annotations); + } @Override public <R, A> R accept(final GenericVisitor<R, A> v, final A arg) { return v.visit(this, arg); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/body/AnnotationDeclaration.java b/javaparser-core/src/main/java/com/github/javaparser/ast/body/AnnotationDeclaration.java index e823829f3..74d84e822 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/body/AnnotationDeclaration.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/body/AnnotationDeclaration.java @@ -21,14 +21,9 @@ package com.github.javaparser.ast.body; -import static com.github.javaparser.Position.pos; - import java.util.List; -import static com.github.javaparser.Position.pos; - import java.util.EnumSet; -import java.util.List; import com.github.javaparser.Range; import com.github.javaparser.ast.Modifier; @@ -53,15 +48,6 @@ public final class AnnotationDeclaration extends TypeDeclaration<AnnotationDecla super(annotations, modifiers, name, members); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public AnnotationDeclaration(int beginLine, int beginColumn, int endLine, int endColumn, EnumSet<Modifier> modifiers, - List<AnnotationExpr> annotations, String name, List<BodyDeclaration<?>> members) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), modifiers, annotations, name, members); - } - public AnnotationDeclaration(Range range, EnumSet<Modifier> modifiers, List<AnnotationExpr> annotations, String name, List<BodyDeclaration<?>> members) { super(range, annotations, modifiers, name, members); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/body/AnnotationMemberDeclaration.java b/javaparser-core/src/main/java/com/github/javaparser/ast/body/AnnotationMemberDeclaration.java index 5d6f611db..58a78f41e 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/body/AnnotationMemberDeclaration.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/body/AnnotationMemberDeclaration.java @@ -21,8 +21,6 @@ package com.github.javaparser.ast.body; -import static com.github.javaparser.Position.pos; - import java.util.EnumSet; import java.util.List; @@ -73,17 +71,6 @@ public final class AnnotationMemberDeclaration extends BodyDeclaration<Annotatio setDefaultValue(defaultValue); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public AnnotationMemberDeclaration(int beginLine, int beginColumn, int endLine, int endColumn, EnumSet<Modifier> modifiers, - List<AnnotationExpr> annotations, Type type, String name, - Expression defaultValue) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), modifiers, annotations, type, name, - defaultValue); - } - public AnnotationMemberDeclaration(Range range, EnumSet<Modifier> modifiers, List<AnnotationExpr> annotations, Type type, String name, Expression defaultValue) { super(range, annotations); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/body/BaseParameter.java b/javaparser-core/src/main/java/com/github/javaparser/ast/body/BaseParameter.java index cf9a1d86c..30608a443 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/body/BaseParameter.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/body/BaseParameter.java @@ -21,7 +21,6 @@ package com.github.javaparser.ast.body; -import static com.github.javaparser.Position.pos; import static com.github.javaparser.ast.internal.Utils.ensureNotNull; import java.util.EnumSet; @@ -62,15 +61,6 @@ public abstract class BaseParameter<T> setId(id); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public BaseParameter(int beginLine, int beginColumn, int endLine, int endColumn, EnumSet<Modifier> modifiers, - List<AnnotationExpr> annotations, VariableDeclaratorId id) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), modifiers, annotations, id); - } - public BaseParameter(final Range range, EnumSet<Modifier> modifiers, List<AnnotationExpr> annotations, VariableDeclaratorId id) { super(range); setModifiers(modifiers); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/body/BodyDeclaration.java b/javaparser-core/src/main/java/com/github/javaparser/ast/body/BodyDeclaration.java index d19473677..ca14774cc 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/body/BodyDeclaration.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/body/BodyDeclaration.java @@ -21,8 +21,6 @@ package com.github.javaparser.ast.body; -import static com.github.javaparser.Position.pos; - import java.util.List; import com.github.javaparser.Range; @@ -45,14 +43,6 @@ public abstract class BodyDeclaration<T> extends Node implements NodeWithAnnotat setAnnotations(annotations); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public BodyDeclaration(int beginLine, int beginColumn, int endLine, int endColumn, List<AnnotationExpr> annotations) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), annotations); - } - public BodyDeclaration(Range range, List<AnnotationExpr> annotations) { super(range); setAnnotations(annotations); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/body/ClassOrInterfaceDeclaration.java b/javaparser-core/src/main/java/com/github/javaparser/ast/body/ClassOrInterfaceDeclaration.java index 41e94c67e..2431f208a 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/body/ClassOrInterfaceDeclaration.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/body/ClassOrInterfaceDeclaration.java @@ -21,7 +21,6 @@ package com.github.javaparser.ast.body; -import static com.github.javaparser.Position.pos; import static com.github.javaparser.ast.internal.Utils.ensureNotNull; import java.util.EnumSet; @@ -72,22 +71,6 @@ public final class ClassOrInterfaceDeclaration extends TypeDeclaration<ClassOrIn setImplements(implementsList); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public ClassOrInterfaceDeclaration(final int beginLine, final int beginColumn, final int endLine, - final int endColumn, final EnumSet<Modifier> modifiers, - final List<AnnotationExpr> annotations, final boolean isInterface, - final String name, - final List<TypeParameter> typeParameters, - final List<ClassOrInterfaceType> extendsList, - final List<ClassOrInterfaceType> implementsList, - final List<BodyDeclaration<?>> members) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), modifiers, annotations, isInterface, name, - typeParameters, extendsList, implementsList, members); - } - public ClassOrInterfaceDeclaration(Range range, final EnumSet<Modifier> modifiers, final List<AnnotationExpr> annotations, final boolean isInterface, final String name, diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/body/ConstructorDeclaration.java b/javaparser-core/src/main/java/com/github/javaparser/ast/body/ConstructorDeclaration.java index 627c84493..ec0a356d2 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/body/ConstructorDeclaration.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/body/ConstructorDeclaration.java @@ -21,7 +21,6 @@ package com.github.javaparser.ast.body; -import static com.github.javaparser.Position.pos; import static com.github.javaparser.ast.internal.Utils.ensureNotNull; import java.util.EnumSet; @@ -85,19 +84,7 @@ public final class ConstructorDeclaration extends BodyDeclaration<ConstructorDec setName(name); setParameters(parameters); setThrows(throws_); - setBlock(block); - } - - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public ConstructorDeclaration(int beginLine, int beginColumn, int endLine, int endColumn, - EnumSet<Modifier> modifiers, - List<AnnotationExpr> annotations, List<TypeParameter> typeParameters, String name, - List<Parameter> parameters, List<ReferenceType> throws_, BlockStmt block) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), modifiers, annotations, typeParameters, - name, parameters, throws_, block); + setBody(block); } public ConstructorDeclaration(Range range, EnumSet<Modifier> modifiers, @@ -109,7 +96,7 @@ public final class ConstructorDeclaration extends BodyDeclaration<ConstructorDec setName(name); setParameters(parameters); setThrows(throws_); - setBlock(block); + setBody(block); } @Override @@ -123,17 +110,6 @@ public final class ConstructorDeclaration extends BodyDeclaration<ConstructorDec } /** - * Use {@link #getBody()} instead - * - * @return - */ - @Deprecated - public BlockStmt getBlock() { - return body; - } - - - /** * Return the modifiers of this member declaration. * * @see Modifier @@ -170,19 +146,6 @@ public final class ConstructorDeclaration extends BodyDeclaration<ConstructorDec return typeParameters; } - /** - * Use {@link #setBody(BlockStmt)} instead - * - * @param block - */ - @Deprecated - public void setBlock(BlockStmt block) { - this.body = block; - setAsParentNodeOf(this.body); - } - - - @Override public ConstructorDeclaration setModifiers(EnumSet<Modifier> modifiers) { this.modifiers = modifiers; @@ -292,6 +255,7 @@ public final class ConstructorDeclaration extends BodyDeclaration<ConstructorDec @Override public ConstructorDeclaration setBody(BlockStmt body) { this.body = body; + setAsParentNodeOf(body); return this; } } diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/body/EmptyMemberDeclaration.java b/javaparser-core/src/main/java/com/github/javaparser/ast/body/EmptyMemberDeclaration.java index bcd882d35..102eb7aa4 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/body/EmptyMemberDeclaration.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/body/EmptyMemberDeclaration.java @@ -21,8 +21,6 @@ package com.github.javaparser.ast.body; -import static com.github.javaparser.Position.pos; - import com.github.javaparser.Range; import com.github.javaparser.ast.comments.JavadocComment; import com.github.javaparser.ast.nodeTypes.NodeWithJavaDoc; @@ -39,14 +37,6 @@ public final class EmptyMemberDeclaration extends BodyDeclaration<EmptyMemberDec super(null); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public EmptyMemberDeclaration(int beginLine, int beginColumn, int endLine, int endColumn) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn))); - } - public EmptyMemberDeclaration(Range range) { super(range, null); } diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/body/EmptyTypeDeclaration.java b/javaparser-core/src/main/java/com/github/javaparser/ast/body/EmptyTypeDeclaration.java index 3c0fecc5c..3a774de99 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/body/EmptyTypeDeclaration.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/body/EmptyTypeDeclaration.java @@ -21,8 +21,6 @@ package com.github.javaparser.ast.body; -import static com.github.javaparser.Position.pos; - import java.util.EnumSet; import com.github.javaparser.Range; @@ -39,14 +37,6 @@ public final class EmptyTypeDeclaration extends TypeDeclaration<EmptyTypeDeclara super(null, EnumSet.noneOf(Modifier.class), null, null); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public EmptyTypeDeclaration(int beginLine, int beginColumn, int endLine, int endColumn) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn))); - } - public EmptyTypeDeclaration(Range range) { super(range, null, EnumSet.noneOf(Modifier.class), null, null); } diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/body/EnumConstantDeclaration.java b/javaparser-core/src/main/java/com/github/javaparser/ast/body/EnumConstantDeclaration.java index caf30f7f4..f0c3c2fbd 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/body/EnumConstantDeclaration.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/body/EnumConstantDeclaration.java @@ -21,7 +21,6 @@ package com.github.javaparser.ast.body; -import static com.github.javaparser.Position.pos; import static com.github.javaparser.ast.internal.Utils.ensureNotNull; import java.util.List; @@ -63,16 +62,6 @@ public final class EnumConstantDeclaration extends BodyDeclaration<EnumConstantD setClassBody(classBody); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public EnumConstantDeclaration(int beginLine, int beginColumn, int endLine, int endColumn, - List<AnnotationExpr> annotations, String name, List<Expression> args, - List<BodyDeclaration<?>> classBody) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), annotations, name, args, classBody); - } - public EnumConstantDeclaration(Range range, List<AnnotationExpr> annotations, String name, List<Expression> args, List<BodyDeclaration<?>> classBody) { super(range, annotations); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/body/EnumDeclaration.java b/javaparser-core/src/main/java/com/github/javaparser/ast/body/EnumDeclaration.java index d41ee294d..013b5ceac 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/body/EnumDeclaration.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/body/EnumDeclaration.java @@ -21,7 +21,6 @@ package com.github.javaparser.ast.body; -import static com.github.javaparser.Position.pos; import static com.github.javaparser.ast.internal.Utils.ensureNotNull; import java.util.EnumSet; @@ -58,16 +57,6 @@ public final class EnumDeclaration extends TypeDeclaration<EnumDeclaration> { setEntries(entries); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public EnumDeclaration(int beginLine, int beginColumn, int endLine, int endColumn, EnumSet<Modifier> modifiers, - List<AnnotationExpr> annotations, String name, List<ClassOrInterfaceType> implementsList, - List<EnumConstantDeclaration> entries, List<BodyDeclaration<?>> members) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), modifiers, annotations, name, implementsList, entries, members); - } - public EnumDeclaration(Range range, EnumSet<Modifier> modifiers, List<AnnotationExpr> annotations, String name, List<ClassOrInterfaceType> implementsList, List<EnumConstantDeclaration> entries, List<BodyDeclaration<?>> members) { 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 611f2c4a4..4544bc364 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 @@ -21,7 +21,6 @@ package com.github.javaparser.ast.body; -import static com.github.javaparser.Position.pos; import static com.github.javaparser.ast.internal.Utils.ensureNotNull; import java.util.ArrayList; @@ -83,15 +82,6 @@ public final class FieldDeclaration extends BodyDeclaration<FieldDeclaration> setVariables(variables); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public FieldDeclaration(int beginLine, int beginColumn, int endLine, int endColumn, EnumSet<Modifier> modifiers, - List<AnnotationExpr> annotations, Type type, List<VariableDeclarator> variables) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), modifiers, annotations, type, variables); - } - public FieldDeclaration(Range range, EnumSet<Modifier> modifiers, List<AnnotationExpr> annotations, Type type, List<VariableDeclarator> variables) { super(range, annotations); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/body/InitializerDeclaration.java b/javaparser-core/src/main/java/com/github/javaparser/ast/body/InitializerDeclaration.java index cc283f81b..d4ba43198 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/body/InitializerDeclaration.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/body/InitializerDeclaration.java @@ -21,8 +21,6 @@ package com.github.javaparser.ast.body; -import static com.github.javaparser.Position.pos; - import com.github.javaparser.Range; import com.github.javaparser.ast.comments.JavadocComment; import com.github.javaparser.ast.nodeTypes.NodeWithJavaDoc; @@ -49,14 +47,6 @@ public final class InitializerDeclaration extends BodyDeclaration<InitializerDec setBlock(block); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public InitializerDeclaration(int beginLine, int beginColumn, int endLine, int endColumn, boolean isStatic, BlockStmt block) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), isStatic, block); - } - public InitializerDeclaration(Range range, boolean isStatic, BlockStmt block) { super(range, null); setStatic(isStatic); 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 2735d9f4c..3d7cefa43 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 @@ -21,7 +21,6 @@ package com.github.javaparser.ast.body; -import static com.github.javaparser.Position.pos; import static com.github.javaparser.ast.internal.Utils.ensureNotNull; import java.util.EnumSet; @@ -107,19 +106,6 @@ public final class MethodDeclaration extends BodyDeclaration<MethodDeclaration> setBody(body); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public MethodDeclaration(final int beginLine, final int beginColumn, final int endLine, final int endColumn, - final EnumSet<Modifier> modifiers, final List<AnnotationExpr> annotations, - final List<TypeParameter> typeParameters, final Type type, final String name, - final List<Parameter> parameters, final int arrayCount, final List<ReferenceType> throws_, - final BlockStmt body) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), modifiers, annotations, typeParameters, - type, name, parameters, arrayCount, throws_, body); - } - public MethodDeclaration(Range range, final EnumSet<Modifier> modifiers, final List<AnnotationExpr> annotations, final List<TypeParameter> typeParameters, final Type type, final String name, diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/body/MultiTypeParameter.java b/javaparser-core/src/main/java/com/github/javaparser/ast/body/MultiTypeParameter.java index 9c2cae994..44b004c83 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/body/MultiTypeParameter.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/body/MultiTypeParameter.java @@ -21,14 +21,9 @@ package com.github.javaparser.ast.body; -import static com.github.javaparser.Position.pos; - import java.util.List; -import static com.github.javaparser.Position.pos; - import java.util.EnumSet; -import java.util.List; import com.github.javaparser.Range; import com.github.javaparser.ast.Modifier; @@ -47,14 +42,6 @@ public class MultiTypeParameter extends BaseParameter<MultiTypeParameter> { this.type = type; } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public MultiTypeParameter(int beginLine, int beginColumn, int endLine, int endColumn, EnumSet<Modifier> modifiers, List<AnnotationExpr> annotations, UnionType type, VariableDeclaratorId id) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), modifiers, annotations, type, id); - } - public MultiTypeParameter(Range range, EnumSet<Modifier> modifiers, List<AnnotationExpr> annotations, UnionType type, VariableDeclaratorId id) { super(range, modifiers, annotations, id); this.type = type; 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 56021e9c5..1a41e43a6 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 @@ -21,8 +21,6 @@ package com.github.javaparser.ast.body; -import static com.github.javaparser.Position.pos; - import java.util.EnumSet; import java.util.List; @@ -55,15 +53,6 @@ public final class Parameter extends BaseParameter<Parameter> implements NodeWit setType(type); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public Parameter(int beginLine, int beginColumn, int endLine, int endColumn, EnumSet<Modifier> modifiers, - List<AnnotationExpr> annotations, Type type, boolean isVarArgs, VariableDeclaratorId id) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), modifiers, annotations, type, isVarArgs, id); - } - public Parameter(final Range range, EnumSet<Modifier> modifiers, List<AnnotationExpr> annotations, Type type, boolean isVarArgs, VariableDeclaratorId id) { super(range, modifiers, annotations, id); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/body/TypeDeclaration.java b/javaparser-core/src/main/java/com/github/javaparser/ast/body/TypeDeclaration.java index 6574253ec..10038efd3 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/body/TypeDeclaration.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/body/TypeDeclaration.java @@ -21,7 +21,6 @@ package com.github.javaparser.ast.body; -import static com.github.javaparser.Position.pos; import static com.github.javaparser.ast.internal.Utils.ensureNotNull; import java.util.EnumSet; @@ -66,17 +65,6 @@ public abstract class TypeDeclaration<T> extends BodyDeclaration<T> setMembers(members); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public TypeDeclaration(int beginLine, int beginColumn, int endLine, - int endColumn, List<AnnotationExpr> annotations, - EnumSet<Modifier> modifiers, String name, - List<BodyDeclaration<?>> members) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), annotations, modifiers, name, members); - } - public TypeDeclaration(Range range, List<AnnotationExpr> annotations, EnumSet<Modifier> modifiers, String name, List<BodyDeclaration<?>> members) { diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/body/VariableDeclarator.java b/javaparser-core/src/main/java/com/github/javaparser/ast/body/VariableDeclarator.java index 8ac668e82..ffd1a1113 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/body/VariableDeclarator.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/body/VariableDeclarator.java @@ -27,8 +27,6 @@ import com.github.javaparser.ast.expr.Expression; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * @author Julio Vilmar Gesser */ @@ -56,14 +54,6 @@ public final class VariableDeclarator extends Node { setInit(init); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public VariableDeclarator(int beginLine, int beginColumn, int endLine, int endColumn, VariableDeclaratorId id, Expression init) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), id, init); - } - public VariableDeclarator(Range range, VariableDeclaratorId id, Expression init) { super(range); setId(id); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/body/VariableDeclaratorId.java b/javaparser-core/src/main/java/com/github/javaparser/ast/body/VariableDeclaratorId.java index ab11a478f..28809f343 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/body/VariableDeclaratorId.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/body/VariableDeclaratorId.java @@ -21,8 +21,6 @@ package com.github.javaparser.ast.body; -import static com.github.javaparser.Position.pos; - import com.github.javaparser.Range; import com.github.javaparser.ast.Node; import com.github.javaparser.ast.nodeTypes.NodeWithName; @@ -45,14 +43,6 @@ public final class VariableDeclaratorId extends Node implements NodeWithName<Var setName(name); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public VariableDeclaratorId(int beginLine, int beginColumn, int endLine, int endColumn, String name, int arrayCount) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), name, arrayCount); - } - public VariableDeclaratorId(Range range, String name, int arrayCount) { super(range); setName(name); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/comments/BlockComment.java b/javaparser-core/src/main/java/com/github/javaparser/ast/comments/BlockComment.java index 49ff2c443..77157d595 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/comments/BlockComment.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/comments/BlockComment.java @@ -25,8 +25,6 @@ import com.github.javaparser.Range; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * <p> * AST node that represent block comments. @@ -45,14 +43,6 @@ public final class BlockComment extends Comment { super(content); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public BlockComment(int beginLine, int beginColumn, int endLine, int endColumn, String content) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), content); - } - public BlockComment(Range range, String content) { super(range, content); } diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/comments/Comment.java b/javaparser-core/src/main/java/com/github/javaparser/ast/comments/Comment.java index c7ff49f4d..3f430fec9 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/comments/Comment.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/comments/Comment.java @@ -24,8 +24,6 @@ package com.github.javaparser.ast.comments; import com.github.javaparser.Range; import com.github.javaparser.ast.Node; -import static com.github.javaparser.Position.pos; - /** * Abstract class for all AST nodes that represent comments. * @@ -46,14 +44,6 @@ public abstract class Comment extends Node { this.content = content; } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public Comment(int beginLine, int beginColumn, int endLine, int endColumn, String content) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), content); - } - public Comment(Range range, String content) { super(range); this.content = content; diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/comments/JavadocComment.java b/javaparser-core/src/main/java/com/github/javaparser/ast/comments/JavadocComment.java index ace4afe7d..18b77af28 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/comments/JavadocComment.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/comments/JavadocComment.java @@ -25,8 +25,6 @@ import com.github.javaparser.Range; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * @author Julio Vilmar Gesser */ @@ -39,14 +37,6 @@ public final class JavadocComment extends Comment { super(content); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public JavadocComment(int beginLine, int beginColumn, int endLine, int endColumn, String content) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), content); - } - public JavadocComment(Range range, String content) { super(range, content); } diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/comments/LineComment.java b/javaparser-core/src/main/java/com/github/javaparser/ast/comments/LineComment.java index a4d360fdf..56b8054d3 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/comments/LineComment.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/comments/LineComment.java @@ -25,8 +25,6 @@ import com.github.javaparser.Range; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * <p> * AST node that represent line comments. @@ -44,14 +42,6 @@ public final class LineComment extends Comment { super(content); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public LineComment(int beginLine, int beginColumn, int endLine, int endColumn, String content) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), content); - } - public LineComment(Range range, String content) { super(range, content); } diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/AnnotationExpr.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/AnnotationExpr.java index 4c456d0ea..5f49b320f 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/AnnotationExpr.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/AnnotationExpr.java @@ -23,8 +23,6 @@ package com.github.javaparser.ast.expr; import com.github.javaparser.Range; -import static com.github.javaparser.Position.pos; - /** * @author Julio Vilmar Gesser */ @@ -34,15 +32,6 @@ public abstract class AnnotationExpr extends Expression { public AnnotationExpr() {} - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public AnnotationExpr(int beginLine, int beginColumn, int endLine, - int endColumn) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn))); - } - public AnnotationExpr(Range range) { super(range); } diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/ArrayAccessExpr.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/ArrayAccessExpr.java index 78b0387e0..050097803 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/ArrayAccessExpr.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/ArrayAccessExpr.java @@ -25,8 +25,6 @@ import com.github.javaparser.Range; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * @author Julio Vilmar Gesser */ @@ -44,14 +42,6 @@ public final class ArrayAccessExpr extends Expression { setIndex(index); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public ArrayAccessExpr(int beginLine, int beginColumn, int endLine, int endColumn, Expression name, Expression index) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), name, index); - } - public ArrayAccessExpr(Range range, Expression name, Expression index) { super(range); setName(name); 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 2cec15e14..441972bef 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 @@ -57,14 +57,6 @@ public final class ArrayCreationExpr extends Expression implements NodeWithType< setDimensions(null); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public ArrayCreationExpr(int beginLine, int beginColumn, int endLine, int endColumn, Type type, int arrayCount, ArrayInitializerExpr initializer) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), type, arrayCount, initializer); - } - public ArrayCreationExpr(Range range, Type type, int arrayCount, ArrayInitializerExpr initializer) { super(range); setType(type); @@ -80,14 +72,6 @@ public final class ArrayCreationExpr extends Expression implements NodeWithType< setInitializer(null); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public ArrayCreationExpr(int beginLine, int beginColumn, int endLine, int endColumn, Type type, List<Expression> dimensions, int arrayCount) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), type, dimensions, arrayCount); - } - public ArrayCreationExpr(Range range, Type type, List<Expression> dimensions, int arrayCount) { super(range); setType(type); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/ArrayInitializerExpr.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/ArrayInitializerExpr.java index 87d84110c..71e6ccd18 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/ArrayInitializerExpr.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/ArrayInitializerExpr.java @@ -27,7 +27,6 @@ import com.github.javaparser.ast.visitor.VoidVisitor; import java.util.List; -import static com.github.javaparser.Position.pos; import static com.github.javaparser.ast.internal.Utils.ensureNotNull; /** @@ -44,14 +43,6 @@ public final class ArrayInitializerExpr extends Expression { setValues(values); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public ArrayInitializerExpr(int beginLine, int beginColumn, int endLine, int endColumn, List<Expression> values) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), values); - } - public ArrayInitializerExpr(Range range, List<Expression> values) { super(range); setValues(values); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/AssignExpr.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/AssignExpr.java index 894926470..23c78da90 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/AssignExpr.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/AssignExpr.java @@ -25,8 +25,6 @@ import com.github.javaparser.Range; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * @author Julio Vilmar Gesser */ @@ -62,14 +60,6 @@ public final class AssignExpr extends Expression { setOperator(op); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public AssignExpr(int beginLine, int beginColumn, int endLine, int endColumn, Expression target, Expression value, Operator op) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), target, value, op); - } - public AssignExpr(Range range, Expression target, Expression value, Operator op) { super(range); setTarget(target); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/BinaryExpr.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/BinaryExpr.java index ba3be347c..4c4121228 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/BinaryExpr.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/BinaryExpr.java @@ -25,8 +25,6 @@ import com.github.javaparser.Range; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * @author Julio Vilmar Gesser */ @@ -69,14 +67,6 @@ public final class BinaryExpr extends Expression { setOperator(op); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public BinaryExpr(int beginLine, int beginColumn, int endLine, int endColumn, Expression left, Expression right, Operator op) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), left, right, op); - } - public BinaryExpr(Range range, Expression left, Expression right, Operator op) { super(range); setLeft(left); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/BooleanLiteralExpr.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/BooleanLiteralExpr.java index 09d1059e6..7eaac8b07 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/BooleanLiteralExpr.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/BooleanLiteralExpr.java @@ -25,8 +25,6 @@ import com.github.javaparser.Range; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * @author Julio Vilmar Gesser */ @@ -41,14 +39,6 @@ public final class BooleanLiteralExpr extends LiteralExpr { setValue(value); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public BooleanLiteralExpr(int beginLine, int beginColumn, int endLine, int endColumn, boolean value) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), value); - } - public BooleanLiteralExpr(Range range, boolean value) { super(range); setValue(value); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/CastExpr.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/CastExpr.java index 39de3e38d..79890beb9 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/CastExpr.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/CastExpr.java @@ -21,8 +21,6 @@ package com.github.javaparser.ast.expr; -import static com.github.javaparser.Position.pos; - import com.github.javaparser.Range; import com.github.javaparser.ast.nodeTypes.NodeWithType; import com.github.javaparser.ast.type.Type; @@ -46,14 +44,6 @@ public final class CastExpr extends Expression implements NodeWithType<CastExpr> setExpr(expr); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public CastExpr(int beginLine, int beginColumn, int endLine, int endColumn, Type type, Expression expr) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), type, expr); - } - public CastExpr(Range range, Type type, Expression expr) { super(range); setType(type); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/CharLiteralExpr.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/CharLiteralExpr.java index 165c03895..ee8408ae3 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/CharLiteralExpr.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/CharLiteralExpr.java @@ -26,9 +26,6 @@ import com.github.javaparser.ast.internal.Utils; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; -import static com.github.javaparser.Range.*; - /** * @author Julio Vilmar Gesser */ @@ -41,14 +38,6 @@ public final class CharLiteralExpr extends StringLiteralExpr { super(value); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public CharLiteralExpr(int beginLine, int beginColumn, int endLine, int endColumn, String value) { - this(range(pos(beginLine, beginColumn), pos(endLine, endColumn)), value); - } - public CharLiteralExpr(Range range, String value) { super(range, value); } diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/ClassExpr.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/ClassExpr.java index 03db56888..a6dc9058d 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/ClassExpr.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/ClassExpr.java @@ -21,8 +21,6 @@ package com.github.javaparser.ast.expr; -import static com.github.javaparser.Position.pos; - import com.github.javaparser.Range; import com.github.javaparser.ast.nodeTypes.NodeWithType; import com.github.javaparser.ast.type.Type; @@ -48,14 +46,6 @@ public final class ClassExpr extends Expression implements NodeWithType<ClassExp setType(type); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public ClassExpr(int beginLine, int beginColumn, int endLine, int endColumn, Type type) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), type); - } - public ClassExpr(Range range, Type type) { super(range); setType(type); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/ConditionalExpr.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/ConditionalExpr.java index 2f3552834..63186a76a 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/ConditionalExpr.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/ConditionalExpr.java @@ -25,8 +25,6 @@ import com.github.javaparser.Range; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * @author Julio Vilmar Gesser */ @@ -47,14 +45,6 @@ public final class ConditionalExpr extends Expression { setElseExpr(elseExpr); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public ConditionalExpr(int beginLine, int beginColumn, int endLine, int endColumn, Expression condition, Expression thenExpr, Expression elseExpr) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), condition, thenExpr, elseExpr); - } - public ConditionalExpr(Range range, Expression condition, Expression thenExpr, Expression elseExpr) { super(range); setCondition(condition); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/DoubleLiteralExpr.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/DoubleLiteralExpr.java index 055d07330..b78923851 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/DoubleLiteralExpr.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/DoubleLiteralExpr.java @@ -25,8 +25,6 @@ import com.github.javaparser.Range; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * @author Julio Vilmar Gesser */ @@ -39,14 +37,6 @@ public final class DoubleLiteralExpr extends StringLiteralExpr { super(value); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public DoubleLiteralExpr(final int beginLine, final int beginColumn, final int endLine, final int endColumn, - final String value) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), value); - } public DoubleLiteralExpr(final Range range, final String value) { super(range, value); } diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/EnclosedExpr.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/EnclosedExpr.java index c7e5a3212..15b5bd3f2 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/EnclosedExpr.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/EnclosedExpr.java @@ -25,8 +25,6 @@ import com.github.javaparser.Range; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * @author Julio Vilmar Gesser */ @@ -41,15 +39,6 @@ public final class EnclosedExpr extends Expression { setInner(inner); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public EnclosedExpr(final int beginLine, final int beginColumn, final int endLine, final int endColumn, - final Expression inner) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), inner); - } - public EnclosedExpr(final Range range, final Expression inner) { super(range); setInner(inner); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/Expression.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/Expression.java index 5d093621c..f9745646f 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/Expression.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/Expression.java @@ -21,8 +21,6 @@ package com.github.javaparser.ast.expr; -import static com.github.javaparser.Position.pos; - import com.github.javaparser.Range; import com.github.javaparser.ast.Node; @@ -34,14 +32,6 @@ public abstract class Expression extends Node { public Expression() { } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public Expression(final int beginLine, final int beginColumn, final int endLine, final int endColumn) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn))); - } - public Expression(Range range) { super(range); } diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/FieldAccessExpr.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/FieldAccessExpr.java index 1d6be96db..1a82c8226 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/FieldAccessExpr.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/FieldAccessExpr.java @@ -28,7 +28,6 @@ import com.github.javaparser.ast.visitor.VoidVisitor; import java.util.List; -import static com.github.javaparser.Position.pos; import static com.github.javaparser.ast.internal.Utils.*; /** @@ -50,15 +49,6 @@ public final class FieldAccessExpr extends Expression { setField(field); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public FieldAccessExpr(final int beginLine, final int beginColumn, final int endLine, final int endColumn, - final Expression scope, final List<Type> typeArgs, final String field) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), scope, typeArgs, field); - } - public FieldAccessExpr(final Range range, final Expression scope, final List<Type> typeArgs, final String field) { super(range); setScope(scope); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/InstanceOfExpr.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/InstanceOfExpr.java index 3fc17b49f..d14b8d065 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/InstanceOfExpr.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/InstanceOfExpr.java @@ -21,8 +21,6 @@ package com.github.javaparser.ast.expr; -import static com.github.javaparser.Position.pos; - import com.github.javaparser.Range; import com.github.javaparser.ast.nodeTypes.NodeWithType; import com.github.javaparser.ast.type.Type; @@ -46,15 +44,6 @@ public final class InstanceOfExpr extends Expression implements NodeWithType<Ins setType(type); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public InstanceOfExpr(final int beginLine, final int beginColumn, final int endLine, final int endColumn, - final Expression expr, final Type type) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), expr, type); - } - public InstanceOfExpr(final Range range, final Expression expr, final Type type) { super(range); setExpr(expr); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/IntegerLiteralExpr.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/IntegerLiteralExpr.java index c8a868d50..91f5dec77 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/IntegerLiteralExpr.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/IntegerLiteralExpr.java @@ -25,8 +25,6 @@ import com.github.javaparser.Range; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * @author Julio Vilmar Gesser */ @@ -43,15 +41,6 @@ public class IntegerLiteralExpr extends StringLiteralExpr { super(value); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public IntegerLiteralExpr(final int beginLine, final int beginColumn, final int endLine, final int endColumn, - final String value) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), value); - } - public IntegerLiteralExpr(final Range range, final String value) { super(range, value); } diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/IntegerLiteralMinValueExpr.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/IntegerLiteralMinValueExpr.java index a624d77c6..2665aafe3 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/IntegerLiteralMinValueExpr.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/IntegerLiteralMinValueExpr.java @@ -25,8 +25,6 @@ import com.github.javaparser.Range; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * @author Julio Vilmar Gesser */ @@ -36,14 +34,6 @@ public final class IntegerLiteralMinValueExpr extends IntegerLiteralExpr { super(MIN_VALUE); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public IntegerLiteralMinValueExpr(final int beginLine, final int beginColumn, final int endLine, final int endColumn) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn))); - } - public IntegerLiteralMinValueExpr(final Range range) { super(range, MIN_VALUE); } diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/LambdaExpr.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/LambdaExpr.java index 6d0a6b801..d97bf75ae 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/LambdaExpr.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/LambdaExpr.java @@ -29,7 +29,6 @@ import com.github.javaparser.ast.visitor.VoidVisitor; import java.util.List; -import static com.github.javaparser.Position.pos; import static com.github.javaparser.ast.internal.Utils.*; /** @@ -48,16 +47,6 @@ public class LambdaExpr extends Expression { public LambdaExpr() { } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public LambdaExpr(int beginLine, int beginColumn, int endLine, - int endColumn, List<Parameter> parameters, Statement body, - boolean parametersEnclosed) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), parameters, body, parametersEnclosed); - } - public LambdaExpr(Range range, List<Parameter> parameters, Statement body, boolean parametersEnclosed) { diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/LiteralExpr.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/LiteralExpr.java index 2c7949585..9cafefdc4 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/LiteralExpr.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/LiteralExpr.java @@ -23,8 +23,6 @@ package com.github.javaparser.ast.expr; import com.github.javaparser.Range; -import static com.github.javaparser.Position.pos; - /** * @author Julio Vilmar Gesser */ @@ -33,14 +31,6 @@ public abstract class LiteralExpr extends Expression { public LiteralExpr() { } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public LiteralExpr(final int beginLine, final int beginColumn, final int endLine, final int endColumn) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn))); - } - public LiteralExpr(Range range) { super(range); } diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/LongLiteralExpr.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/LongLiteralExpr.java index cc25d1016..0e2e8f299 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/LongLiteralExpr.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/LongLiteralExpr.java @@ -25,8 +25,6 @@ import com.github.javaparser.Range; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * @author Julio Vilmar Gesser */ @@ -43,15 +41,6 @@ public class LongLiteralExpr extends StringLiteralExpr { super(value); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public LongLiteralExpr(final int beginLine, final int beginColumn, final int endLine, final int endColumn, - final String value) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), value); - } - public LongLiteralExpr(final Range range, final String value) { super(range, value); } diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/LongLiteralMinValueExpr.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/LongLiteralMinValueExpr.java index b213cd0d2..d46145a4a 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/LongLiteralMinValueExpr.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/LongLiteralMinValueExpr.java @@ -25,8 +25,6 @@ import com.github.javaparser.Range; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * @author Julio Vilmar Gesser */ @@ -36,14 +34,6 @@ public final class LongLiteralMinValueExpr extends LongLiteralExpr { super(MIN_VALUE); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public LongLiteralMinValueExpr(final int beginLine, final int beginColumn, final int endLine, final int endColumn) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn))); - } - public LongLiteralMinValueExpr(final Range range) { super(range, MIN_VALUE); } diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/MarkerAnnotationExpr.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/MarkerAnnotationExpr.java index 3b804a1a7..1a117ff97 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/MarkerAnnotationExpr.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/MarkerAnnotationExpr.java @@ -25,8 +25,6 @@ import com.github.javaparser.Range; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * @author Julio Vilmar Gesser */ @@ -39,15 +37,6 @@ public final class MarkerAnnotationExpr extends AnnotationExpr { setName(name); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public MarkerAnnotationExpr(final int beginLine, final int beginColumn, final int endLine, final int endColumn, - final NameExpr name) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), name); - } - public MarkerAnnotationExpr(final Range range, final NameExpr name) { super(range); setName(name); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/MemberValuePair.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/MemberValuePair.java index 1b8b463ca..c6cbc4191 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/MemberValuePair.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/MemberValuePair.java @@ -21,8 +21,6 @@ package com.github.javaparser.ast.expr; -import static com.github.javaparser.Position.pos; - import com.github.javaparser.Range; import com.github.javaparser.ast.Node; import com.github.javaparser.ast.nodeTypes.NodeWithName; @@ -46,15 +44,6 @@ public final class MemberValuePair extends Node implements NodeWithName<MemberVa setValue(value); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public MemberValuePair(final int beginLine, final int beginColumn, final int endLine, final int endColumn, - final String name, final Expression value) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), name, value); - } - public MemberValuePair(final Range range, final String name, final Expression value) { super(range); setName(name); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/MethodCallExpr.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/MethodCallExpr.java index 2c0d82c2b..5c2f4f674 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/MethodCallExpr.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/MethodCallExpr.java @@ -28,7 +28,6 @@ import com.github.javaparser.ast.visitor.VoidVisitor; import java.util.List; -import static com.github.javaparser.Position.pos; import static com.github.javaparser.ast.internal.Utils.*; /** @@ -58,15 +57,6 @@ public final class MethodCallExpr extends Expression { setArgs(args); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public MethodCallExpr(final int beginLine, final int beginColumn, final int endLine, final int endColumn, - final Expression scope, final List<Type> typeArgs, final String name, final List<Expression> args) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), scope, typeArgs, name, args); - } - public MethodCallExpr(final Range range, final Expression scope, final List<Type> typeArgs, final String name, final List<Expression> args) { super(range); setScope(scope); 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 f4219f4ef..d8c78f8ed 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 @@ -23,15 +23,9 @@ package com.github.javaparser.ast.expr; import com.github.javaparser.Range; import com.github.javaparser.ast.TypeArguments; -import com.github.javaparser.ast.TypeParameter; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import java.util.List; - -import static com.github.javaparser.Position.pos; -import static com.github.javaparser.ast.internal.Utils.*; - /** * Method reference expressions introduced in Java 8 specifically designed to simplify lambda Expressions. * These are some examples: @@ -53,16 +47,6 @@ public class MethodReferenceExpr extends Expression { public MethodReferenceExpr() { } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public MethodReferenceExpr(int beginLine, int beginColumn, int endLine, - int endColumn, Expression scope, - TypeArguments typeArguments, String identifier) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), scope, typeArguments, identifier); - } - public MethodReferenceExpr(Range range, Expression scope, TypeArguments typeArguments, String identifier) { super(range); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/NameExpr.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/NameExpr.java index a45c84f0d..c8df4643e 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/NameExpr.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/NameExpr.java @@ -21,8 +21,6 @@ package com.github.javaparser.ast.expr; -import static com.github.javaparser.Position.pos; - import com.github.javaparser.Range; import com.github.javaparser.ast.nodeTypes.NodeWithName; import com.github.javaparser.ast.visitor.GenericVisitor; @@ -42,15 +40,6 @@ public class NameExpr extends Expression implements NodeWithName<NameExpr> { this.name = name; } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public NameExpr(final int beginLine, final int beginColumn, final int endLine, final int endColumn, - final String name) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), name); - } - public NameExpr(Range range, final String name) { super(range); this.name = name; diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/NormalAnnotationExpr.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/NormalAnnotationExpr.java index e12f286ac..9d15ad080 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/NormalAnnotationExpr.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/NormalAnnotationExpr.java @@ -21,7 +21,6 @@ package com.github.javaparser.ast.expr; -import static com.github.javaparser.Position.pos; import static com.github.javaparser.ast.internal.Utils.ensureNotNull; import java.util.List; @@ -46,15 +45,6 @@ public final class NormalAnnotationExpr extends AnnotationExpr { setPairs(pairs); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public NormalAnnotationExpr(final int beginLine, final int beginColumn, final int endLine, final int endColumn, - final NameExpr name, final List<MemberValuePair> pairs) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), name, pairs); - } - public NormalAnnotationExpr(final Range range, final NameExpr name, final List<MemberValuePair> pairs) { super(range); setName(name); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/NullLiteralExpr.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/NullLiteralExpr.java index 48816c813..cb0a92b83 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/NullLiteralExpr.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/NullLiteralExpr.java @@ -25,8 +25,6 @@ import com.github.javaparser.Range; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * @author Julio Vilmar Gesser */ @@ -35,14 +33,6 @@ public final class NullLiteralExpr extends LiteralExpr { public NullLiteralExpr() { } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public NullLiteralExpr(final int beginLine, final int beginColumn, final int endLine, final int endColumn) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn))); - } - public NullLiteralExpr(final Range range) { super(range); } diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/ObjectCreationExpr.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/ObjectCreationExpr.java index e7914bb70..979800064 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/ObjectCreationExpr.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/ObjectCreationExpr.java @@ -21,7 +21,6 @@ package com.github.javaparser.ast.expr; -import static com.github.javaparser.Position.pos; import static com.github.javaparser.ast.internal.Utils.ensureNotNull; import java.util.List; @@ -70,16 +69,6 @@ public final class ObjectCreationExpr extends Expression { setArgs(args); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public ObjectCreationExpr(final int beginLine, final int beginColumn, final int endLine, final int endColumn, - final Expression scope, final ClassOrInterfaceType type, final List<Type> typeArgs, - final List<Expression> args, final List<BodyDeclaration<?>> anonymousBody) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), scope, type, typeArgs, args, anonymousBody); - } - public ObjectCreationExpr(final Range range, final Expression scope, final ClassOrInterfaceType type, final List<Type> typeArgs, final List<Expression> args, final List<BodyDeclaration<?>> anonymousBody) { diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/QualifiedNameExpr.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/QualifiedNameExpr.java index 19070882c..9c9600f23 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/QualifiedNameExpr.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/QualifiedNameExpr.java @@ -25,8 +25,6 @@ import com.github.javaparser.Range; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * @author Julio Vilmar Gesser */ @@ -42,15 +40,6 @@ public final class QualifiedNameExpr extends NameExpr { setQualifier(scope); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public QualifiedNameExpr(final int beginLine, final int beginColumn, final int endLine, final int endColumn, - final NameExpr scope, final String name) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), scope, name); - } - public QualifiedNameExpr(final Range range, final NameExpr scope, final String name) { super(range, name); setQualifier(scope); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/SingleMemberAnnotationExpr.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/SingleMemberAnnotationExpr.java index d99912c97..0aa88ce71 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/SingleMemberAnnotationExpr.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/SingleMemberAnnotationExpr.java @@ -25,8 +25,6 @@ import com.github.javaparser.Range; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * @author Julio Vilmar Gesser */ @@ -42,15 +40,6 @@ public final class SingleMemberAnnotationExpr extends AnnotationExpr { setMemberValue(memberValue); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public SingleMemberAnnotationExpr(final int beginLine, final int beginColumn, final int endLine, - final int endColumn, final NameExpr name, final Expression memberValue) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), name, memberValue); - } - public SingleMemberAnnotationExpr(final Range range, final NameExpr name, final Expression memberValue) { super(range); setName(name); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/StringLiteralExpr.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/StringLiteralExpr.java index 5f380b34b..7f3276e96 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/StringLiteralExpr.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/StringLiteralExpr.java @@ -26,8 +26,6 @@ import com.github.javaparser.ast.internal.Utils; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * Java® Language Specification 3.10.5 String Literals * @author Julio Vilmar Gesser @@ -54,14 +52,6 @@ public class StringLiteralExpr extends LiteralExpr { return new StringLiteralExpr(Utils.escapeEndOfLines(string)); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public StringLiteralExpr(final int beginLine, final int beginColumn, final int endLine, final int endColumn, - final String value) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), value); - } public StringLiteralExpr(final Range range, final String value) { super(range); this.value = value; diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/SuperExpr.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/SuperExpr.java index c9c90c6c7..3067bae91 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/SuperExpr.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/SuperExpr.java @@ -25,8 +25,6 @@ import com.github.javaparser.Range; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * @author Julio Vilmar Gesser */ @@ -41,15 +39,6 @@ public final class SuperExpr extends Expression { setClassExpr(classExpr); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public SuperExpr(final int beginLine, final int beginColumn, final int endLine, final int endColumn, - final Expression classExpr) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), classExpr); - } - public SuperExpr(final Range range, final Expression classExpr) { super(range); setClassExpr(classExpr); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/ThisExpr.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/ThisExpr.java index 8f7727864..89be4ada9 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/ThisExpr.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/ThisExpr.java @@ -25,8 +25,6 @@ import com.github.javaparser.Range; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * @author Julio Vilmar Gesser */ @@ -41,15 +39,6 @@ public final class ThisExpr extends Expression { setClassExpr(classExpr); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public ThisExpr(final int beginLine, final int beginColumn, final int endLine, final int endColumn, - final Expression classExpr) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), classExpr); - } - public ThisExpr(final Range range, final Expression classExpr) { super(range); setClassExpr(classExpr); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/TypeExpr.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/TypeExpr.java index a2aa52f0e..c6cd74ce5 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/TypeExpr.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/TypeExpr.java @@ -21,8 +21,6 @@ package com.github.javaparser.ast.expr; -import static com.github.javaparser.Position.pos; - import com.github.javaparser.Range; import com.github.javaparser.ast.nodeTypes.NodeWithType; import com.github.javaparser.ast.type.Type; @@ -40,14 +38,6 @@ public class TypeExpr extends Expression implements NodeWithType<TypeExpr> { public TypeExpr(){} - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public TypeExpr(int beginLine, int beginColumn, int endLine, int endColumn, Type type) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), type); - } - public TypeExpr(Range range, Type type) { super(range); setType(type); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/UnaryExpr.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/UnaryExpr.java index e342571fc..c784080a2 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/UnaryExpr.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/UnaryExpr.java @@ -25,8 +25,6 @@ import com.github.javaparser.Range; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * @author Julio Vilmar Gesser */ @@ -55,15 +53,6 @@ public final class UnaryExpr extends Expression { setOperator(op); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public UnaryExpr(final int beginLine, final int beginColumn, final int endLine, final int endColumn, - final Expression expr, final Operator op) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), expr, op); - } - public UnaryExpr(final Range range, final Expression expr, final Operator op) { super(range); setExpr(expr); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/VariableDeclarationExpr.java b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/VariableDeclarationExpr.java index b742234ca..9724d80df 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/expr/VariableDeclarationExpr.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/expr/VariableDeclarationExpr.java @@ -21,7 +21,6 @@ package com.github.javaparser.ast.expr; -import static com.github.javaparser.Position.pos; import static com.github.javaparser.ast.internal.Utils.ensureNotNull; import java.util.EnumSet; @@ -67,17 +66,6 @@ public final class VariableDeclarationExpr extends Expression setVars(vars); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public VariableDeclarationExpr(final int beginLine, final int beginColumn, final int endLine, final int endColumn, - final EnumSet<Modifier> modifiers, final List<AnnotationExpr> annotations, - final Type type, - final List<VariableDeclarator> vars) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), modifiers, annotations, type, vars); - } - public VariableDeclarationExpr(final Range range, final EnumSet<Modifier> modifiers, final List<AnnotationExpr> annotations, final Type type, diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/AssertStmt.java b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/AssertStmt.java index 44b4e0083..3fbdd01fc 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/AssertStmt.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/AssertStmt.java @@ -21,15 +21,11 @@ package com.github.javaparser.ast.stmt; -import com.github.javaparser.Position; import com.github.javaparser.Range; import com.github.javaparser.ast.expr.Expression; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; -import static com.github.javaparser.Range.range; - /** * @author Julio Vilmar Gesser */ @@ -51,15 +47,6 @@ public final class AssertStmt extends Statement { setMessage(msg); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public AssertStmt(final int beginLine, final int beginColumn, final int endLine, final int endColumn, - final Expression check, final Expression msg) { - this(range(beginLine, beginColumn, endLine, endColumn), check, msg); - } - public AssertStmt(final Range range, final Expression check, final Expression msg) { super(range); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/BlockStmt.java b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/BlockStmt.java index 35a6bc01d..16dacf0f8 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/BlockStmt.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/BlockStmt.java @@ -21,7 +21,6 @@ package com.github.javaparser.ast.stmt; -import static com.github.javaparser.Position.pos; import static com.github.javaparser.ast.internal.Utils.ensureNotNull; import java.util.List; @@ -45,15 +44,6 @@ public final class BlockStmt extends Statement { setStmts(stmts); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public BlockStmt(final int beginLine, final int beginColumn, - final int endLine, final int endColumn, final List<Statement> stmts) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), stmts); - } - public BlockStmt(final Range range, final List<Statement> stmts) { super(range); setStmts(stmts); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/BreakStmt.java b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/BreakStmt.java index cd32b5ba8..338016f09 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/BreakStmt.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/BreakStmt.java @@ -21,13 +21,10 @@ package com.github.javaparser.ast.stmt; -import com.github.javaparser.Position; import com.github.javaparser.Range; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * @author Julio Vilmar Gesser */ @@ -42,14 +39,6 @@ public final class BreakStmt extends Statement { this.id = id; } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public BreakStmt(final int beginLine, final int beginColumn, final int endLine, final int endColumn, final String id) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), id); - } - public BreakStmt(final Range range, final String id) { super(range); this.id = id; diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/CatchClause.java b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/CatchClause.java index 486a6e49c..2db16093b 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/CatchClause.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/CatchClause.java @@ -21,8 +21,6 @@ package com.github.javaparser.ast.stmt; -import static com.github.javaparser.Position.pos; - import java.util.EnumSet; import java.util.List; @@ -53,17 +51,6 @@ public final class CatchClause extends Node { setCatchBlock(catchBlock); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public CatchClause(final int beginLine, final int beginColumn, final int endLine, final int endColumn, - final EnumSet<Modifier> exceptModifier, final List<AnnotationExpr> exceptAnnotations, - final Type exceptTypes, - final VariableDeclaratorId exceptId, final BlockStmt catchBlock) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), exceptModifier, exceptAnnotations, exceptTypes, exceptId, catchBlock); - } - public CatchClause(final Range range, final EnumSet<Modifier> exceptModifier, final List<AnnotationExpr> exceptAnnotations, final Type exceptTypes, diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/ContinueStmt.java b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/ContinueStmt.java index 8dd548088..f6f9effb9 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/ContinueStmt.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/ContinueStmt.java @@ -21,13 +21,10 @@ package com.github.javaparser.ast.stmt; -import com.github.javaparser.Position; import com.github.javaparser.Range; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * @author Julio Vilmar Gesser */ @@ -42,15 +39,6 @@ public final class ContinueStmt extends Statement { this.id = id; } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public ContinueStmt(final int beginLine, final int beginColumn, final int endLine, final int endColumn, - final String id) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), id); - } - public ContinueStmt(Range range, final String id) { super(range); this.id = id; diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/DoStmt.java b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/DoStmt.java index d0fe891ee..bc4147302 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/DoStmt.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/DoStmt.java @@ -21,14 +21,11 @@ package com.github.javaparser.ast.stmt; -import com.github.javaparser.Position; import com.github.javaparser.Range; import com.github.javaparser.ast.expr.Expression; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * @author Julio Vilmar Gesser */ @@ -46,15 +43,6 @@ public final class DoStmt extends Statement { setCondition(condition); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public DoStmt(final int beginLine, final int beginColumn, final int endLine, final int endColumn, - final Statement body, final Expression condition) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), body, condition); - } - public DoStmt(Range range, final Statement body, final Expression condition) { super(range); setBody(body); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/EmptyStmt.java b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/EmptyStmt.java index e1f718912..00709806d 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/EmptyStmt.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/EmptyStmt.java @@ -21,13 +21,10 @@ package com.github.javaparser.ast.stmt; -import com.github.javaparser.Position; import com.github.javaparser.Range; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * @author Julio Vilmar Gesser */ @@ -36,14 +33,6 @@ public final class EmptyStmt extends Statement { public EmptyStmt() { } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public EmptyStmt(final int beginLine, final int beginColumn, final int endLine, final int endColumn) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn))); - } - public EmptyStmt(Range range) { super(range); } diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/ExplicitConstructorInvocationStmt.java b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/ExplicitConstructorInvocationStmt.java index e67dc3172..5af6cf769 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/ExplicitConstructorInvocationStmt.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/ExplicitConstructorInvocationStmt.java @@ -21,7 +21,6 @@ package com.github.javaparser.ast.stmt; -import com.github.javaparser.Position; import com.github.javaparser.Range; import com.github.javaparser.ast.expr.Expression; import com.github.javaparser.ast.type.Type; @@ -30,7 +29,6 @@ import com.github.javaparser.ast.visitor.VoidVisitor; import java.util.List; -import static com.github.javaparser.Position.pos; import static com.github.javaparser.ast.internal.Utils.*; /** @@ -56,16 +54,6 @@ public final class ExplicitConstructorInvocationStmt extends Statement { setArgs(args); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public ExplicitConstructorInvocationStmt(final int beginLine, - final int beginColumn, final int endLine, final int endColumn, - final List<Type> typeArgs, final boolean isThis, - final Expression expr, final List<Expression> args) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), typeArgs, isThis, expr, args); - } public ExplicitConstructorInvocationStmt(Range range, final List<Type> typeArgs, final boolean isThis, final Expression expr, final List<Expression> args) { diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/ExpressionStmt.java b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/ExpressionStmt.java index cd203f7a9..a6d209dde 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/ExpressionStmt.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/ExpressionStmt.java @@ -21,14 +21,11 @@ package com.github.javaparser.ast.stmt; -import com.github.javaparser.Position; import com.github.javaparser.Range; import com.github.javaparser.ast.expr.Expression; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * @author Julio Vilmar Gesser */ @@ -43,14 +40,6 @@ public final class ExpressionStmt extends Statement { setExpression(expr); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public ExpressionStmt(final int beginLine, final int beginColumn, final int endLine, final int endColumn, - final Expression expr) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), expr); - } public ExpressionStmt(Range range, final Expression expr) { super(range); 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 0dd8d131a..e06726129 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 @@ -21,7 +21,6 @@ package com.github.javaparser.ast.stmt; -import com.github.javaparser.Position; import com.github.javaparser.Range; import com.github.javaparser.ast.expr.Expression; import com.github.javaparser.ast.visitor.GenericVisitor; @@ -29,7 +28,6 @@ import com.github.javaparser.ast.visitor.VoidVisitor; import java.util.List; -import static com.github.javaparser.Position.pos; import static com.github.javaparser.ast.internal.Utils.*; /** @@ -56,17 +54,6 @@ public final class ForStmt extends Statement { setBody(body); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public ForStmt(final int beginLine, final int beginColumn, - final int endLine, final int endColumn, - final List<Expression> init, final Expression compare, - final List<Expression> update, final Statement body) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), init, compare, update, body); - } - public ForStmt(Range range, final List<Expression> init, final Expression compare, final List<Expression> update, final Statement body) { diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/ForeachStmt.java b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/ForeachStmt.java index 02d614d27..5be8503bc 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/ForeachStmt.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/ForeachStmt.java @@ -21,15 +21,12 @@ package com.github.javaparser.ast.stmt; -import com.github.javaparser.Position; import com.github.javaparser.Range; import com.github.javaparser.ast.expr.Expression; import com.github.javaparser.ast.expr.VariableDeclarationExpr; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * @author Julio Vilmar Gesser */ @@ -51,17 +48,6 @@ public final class ForeachStmt extends Statement { setBody(body); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public ForeachStmt(final int beginLine, final int beginColumn, - final int endLine, final int endColumn, - final VariableDeclarationExpr var, final Expression iterable, - final Statement body) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), var, iterable, body); - } - public ForeachStmt(Range range, final VariableDeclarationExpr var, final Expression iterable, final Statement body) { diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/IfStmt.java b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/IfStmt.java index 2f9d390e2..dc491a475 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/IfStmt.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/IfStmt.java @@ -21,14 +21,11 @@ package com.github.javaparser.ast.stmt; -import com.github.javaparser.Position; import com.github.javaparser.Range; import com.github.javaparser.ast.expr.Expression; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * @author Julio Vilmar Gesser */ @@ -49,15 +46,6 @@ public final class IfStmt extends Statement { setElseStmt(elseStmt); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public IfStmt(final int beginLine, final int beginColumn, final int endLine, final int endColumn, - final Expression condition, final Statement thenStmt, final Statement elseStmt) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), condition, thenStmt, elseStmt); - } - public IfStmt(Range range, final Expression condition, final Statement thenStmt, final Statement elseStmt) { super(range); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/LabeledStmt.java b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/LabeledStmt.java index 46dceb04f..9a956d1d9 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/LabeledStmt.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/LabeledStmt.java @@ -21,13 +21,10 @@ package com.github.javaparser.ast.stmt; -import com.github.javaparser.Position; import com.github.javaparser.Range; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * @author Julio Vilmar Gesser */ @@ -45,15 +42,6 @@ public final class LabeledStmt extends Statement { setStmt(stmt); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public LabeledStmt(final int beginLine, final int beginColumn, final int endLine, final int endColumn, - final String label, final Statement stmt) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), label, stmt); - } - public LabeledStmt(Range range, final String label, final Statement stmt) { super(range); setLabel(label); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/ReturnStmt.java b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/ReturnStmt.java index dcdd80fa6..0c32b9433 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/ReturnStmt.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/ReturnStmt.java @@ -21,14 +21,11 @@ package com.github.javaparser.ast.stmt; -import com.github.javaparser.Position; import com.github.javaparser.Range; import com.github.javaparser.ast.expr.Expression; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * @author Julio Vilmar Gesser */ @@ -43,15 +40,6 @@ public final class ReturnStmt extends Statement { setExpr(expr); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public ReturnStmt(final int beginLine, final int beginColumn, final int endLine, final int endColumn, - final Expression expr) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), expr); - } - public ReturnStmt(Range range, final Expression expr) { super(range); setExpr(expr); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/Statement.java b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/Statement.java index 5dec45bdb..eacfcc416 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/Statement.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/Statement.java @@ -21,13 +21,9 @@ package com.github.javaparser.ast.stmt; -import com.github.javaparser.Position; import com.github.javaparser.Range; import com.github.javaparser.ast.Node; -import static com.github.javaparser.Position.pos; -import static com.github.javaparser.Range.*; - /** * @author Julio Vilmar Gesser */ @@ -36,14 +32,6 @@ public abstract class Statement extends Node { public Statement() { } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public Statement(final int beginLine, final int beginColumn, final int endLine, final int endColumn) { - this(range(beginLine, beginColumn, endLine, endColumn)); - } - public Statement(final Range range) { super(range); } 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 1b102590c..24e08d022 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 @@ -21,7 +21,6 @@ package com.github.javaparser.ast.stmt; -import com.github.javaparser.Position; import com.github.javaparser.Range; import com.github.javaparser.ast.expr.Expression; import com.github.javaparser.ast.visitor.GenericVisitor; @@ -29,7 +28,6 @@ import com.github.javaparser.ast.visitor.VoidVisitor; import java.util.List; -import static com.github.javaparser.Position.pos; import static com.github.javaparser.ast.internal.Utils.*; /** @@ -49,16 +47,6 @@ public final class SwitchEntryStmt extends Statement { setStmts(stmts); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public SwitchEntryStmt(final int beginLine, final int beginColumn, - final int endLine, final int endColumn, final Expression label, - final List<Statement> stmts) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), label, stmts); - } - public SwitchEntryStmt(Range range, final Expression label, final List<Statement> stmts) { super(range); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/SwitchStmt.java b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/SwitchStmt.java index 788ce837b..4e46838ea 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/SwitchStmt.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/SwitchStmt.java @@ -21,7 +21,6 @@ package com.github.javaparser.ast.stmt; -import com.github.javaparser.Position; import com.github.javaparser.Range; import com.github.javaparser.ast.expr.Expression; import com.github.javaparser.ast.visitor.GenericVisitor; @@ -29,7 +28,6 @@ import com.github.javaparser.ast.visitor.VoidVisitor; import java.util.List; -import static com.github.javaparser.Position.pos; import static com.github.javaparser.ast.internal.Utils.*; /** @@ -50,16 +48,6 @@ public final class SwitchStmt extends Statement { setEntries(entries); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public SwitchStmt(final int beginLine, final int beginColumn, - final int endLine, final int endColumn, final Expression selector, - final List<SwitchEntryStmt> entries) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), selector, entries); - } - public SwitchStmt(Range range, final Expression selector, final List<SwitchEntryStmt> entries) { super(range); 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 c348e5e3a..af37c583f 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 @@ -21,14 +21,11 @@ package com.github.javaparser.ast.stmt; -import com.github.javaparser.Position; import com.github.javaparser.Range; import com.github.javaparser.ast.expr.Expression; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * @author Julio Vilmar Gesser */ @@ -46,16 +43,6 @@ public final class SynchronizedStmt extends Statement { setBlock(block); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public SynchronizedStmt(final int beginLine, final int beginColumn, - final int endLine, final int endColumn, final Expression expr, - final BlockStmt block) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), expr, block); - } - public SynchronizedStmt(Range range, final Expression expr, final BlockStmt block) { super(range); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/ThrowStmt.java b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/ThrowStmt.java index 9160da870..07ee473dc 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/ThrowStmt.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/ThrowStmt.java @@ -21,14 +21,11 @@ package com.github.javaparser.ast.stmt; -import com.github.javaparser.Position; import com.github.javaparser.Range; import com.github.javaparser.ast.expr.Expression; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * @author Julio Vilmar Gesser */ @@ -43,15 +40,6 @@ public final class ThrowStmt extends Statement { setExpr(expr); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public ThrowStmt(final int beginLine, final int beginColumn, final int endLine, final int endColumn, - final Expression expr) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), expr); - } - public ThrowStmt(Range range, final Expression expr) { super(range); setExpr(expr); 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 2015b9e44..0f1015fcf 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 @@ -21,7 +21,6 @@ package com.github.javaparser.ast.stmt; -import com.github.javaparser.Position; import com.github.javaparser.Range; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; @@ -29,7 +28,6 @@ import com.github.javaparser.ast.expr.VariableDeclarationExpr; import java.util.List; -import static com.github.javaparser.Position.pos; import static com.github.javaparser.ast.internal.Utils.*; /** @@ -55,16 +53,6 @@ public final class TryStmt extends Statement { setFinallyBlock(finallyBlock); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public TryStmt(final int beginLine, final int beginColumn, - final int endLine, final int endColumn, List<VariableDeclarationExpr> resources, - final BlockStmt tryBlock, final List<CatchClause> catchs, final BlockStmt finallyBlock) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), resources, tryBlock, catchs, finallyBlock); - } - public TryStmt(Range range, List<VariableDeclarationExpr> resources, final BlockStmt tryBlock, final List<CatchClause> catchs, final BlockStmt finallyBlock) { super(range); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/TypeDeclarationStmt.java b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/TypeDeclarationStmt.java index e9bb8d75b..360d55901 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/TypeDeclarationStmt.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/TypeDeclarationStmt.java @@ -21,14 +21,11 @@ package com.github.javaparser.ast.stmt; -import com.github.javaparser.Position; import com.github.javaparser.Range; import com.github.javaparser.ast.body.TypeDeclaration; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * @author Julio Vilmar Gesser */ @@ -43,15 +40,6 @@ public final class TypeDeclarationStmt extends Statement { setTypeDeclaration(typeDecl); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public TypeDeclarationStmt(final int beginLine, final int beginColumn, final int endLine, final int endColumn, - final TypeDeclaration typeDecl) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), typeDecl); - } - public TypeDeclarationStmt(Range range, final TypeDeclaration typeDecl) { super(range); setTypeDeclaration(typeDecl); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/WhileStmt.java b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/WhileStmt.java index c1c2401f9..3ae55a047 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/WhileStmt.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/WhileStmt.java @@ -21,14 +21,11 @@ package com.github.javaparser.ast.stmt; -import com.github.javaparser.Position; import com.github.javaparser.Range; import com.github.javaparser.ast.expr.Expression; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * @author Julio Vilmar Gesser */ @@ -46,15 +43,6 @@ public final class WhileStmt extends Statement { setBody(body); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public WhileStmt(final int beginLine, final int beginColumn, final int endLine, final int endColumn, - final Expression condition, final Statement body) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), condition, body); - } - public WhileStmt(Range range, final Expression condition, final Statement body) { super(range); setCondition(condition); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/type/ClassOrInterfaceType.java b/javaparser-core/src/main/java/com/github/javaparser/ast/type/ClassOrInterfaceType.java index 2d6f4315d..78160b59c 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/type/ClassOrInterfaceType.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/type/ClassOrInterfaceType.java @@ -21,8 +21,6 @@ package com.github.javaparser.ast.type; -import static com.github.javaparser.Position.pos; - import java.util.List; import com.github.javaparser.Range; @@ -54,25 +52,6 @@ public final class ClassOrInterfaceType extends Type implements NodeWithName<Cla setName(name); } - /** - * - * @deprecated use the other constructor that takes {@link TypeArguments} - */ - @Deprecated - public ClassOrInterfaceType(final int beginLine, final int beginColumn, final int endLine, final int endColumn, - final ClassOrInterfaceType scope, final String name, final List<Type> typeArgs) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), scope, name, TypeArguments.withArguments(typeArgs)); - } - - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public ClassOrInterfaceType(final int beginLine, final int beginColumn, final int endLine, final int endColumn, - final ClassOrInterfaceType scope, final String name, final TypeArguments typeArgs) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), scope, name, typeArgs); - } - public ClassOrInterfaceType(final Range range, final ClassOrInterfaceType scope, final String name, final TypeArguments typeArguments) { super(range); setScope(scope); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/type/IntersectionType.java b/javaparser-core/src/main/java/com/github/javaparser/ast/type/IntersectionType.java index 47e582974..a37370e7d 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/type/IntersectionType.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/type/IntersectionType.java @@ -1,14 +1,11 @@ package com.github.javaparser.ast.type; import com.github.javaparser.Range; -import com.github.javaparser.ast.expr.AnnotationExpr; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; import java.util.List; -import static com.github.javaparser.Position.pos; - /** * Represents a set of types. A given value of this type has to be assignable to at all of the element types. * As of Java 8 it is used in casts or while expressing bounds for generic types. @@ -25,15 +22,6 @@ public class IntersectionType extends Type { private List<ReferenceType> elements; - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public IntersectionType(int beginLine, int beginColumn, int endLine, - int endColumn, List<ReferenceType> elements) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), elements); - } - public IntersectionType(Range range, List<ReferenceType> elements) { super(range); setElements(elements); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/type/PrimitiveType.java b/javaparser-core/src/main/java/com/github/javaparser/ast/type/PrimitiveType.java index 07d53b342..7fb44d0b2 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/type/PrimitiveType.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/type/PrimitiveType.java @@ -27,8 +27,6 @@ import com.github.javaparser.Range; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * @author Julio Vilmar Gesser */ @@ -71,15 +69,6 @@ public final class PrimitiveType extends Type { this.type = type; } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public PrimitiveType(final int beginLine, final int beginColumn, final int endLine, final int endColumn, - final Primitive type) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), type); - } - public PrimitiveType(Range range, final Primitive type) { super(range); this.type = type; diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/type/ReferenceType.java b/javaparser-core/src/main/java/com/github/javaparser/ast/type/ReferenceType.java index a51985450..ec40d2af4 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/type/ReferenceType.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/type/ReferenceType.java @@ -55,15 +55,6 @@ public final class ReferenceType extends Type implements NodeWithType<ReferenceT setArrayCount(arrayCount); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public ReferenceType(final int beginLine, final int beginColumn, final int endLine, final int endColumn, - final Type type, final int arrayCount) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), type, arrayCount); - } - public ReferenceType(final Range range, final Type type, final int arrayCount) { super(range); setType(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 394ac92c3..9544f328a 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 @@ -21,14 +21,12 @@ package com.github.javaparser.ast.type; -import com.github.javaparser.Position; import com.github.javaparser.Range; import com.github.javaparser.ast.Node; import com.github.javaparser.ast.expr.AnnotationExpr; import java.util.List; -import static com.github.javaparser.Position.pos; import static com.github.javaparser.ast.internal.Utils.*; /** @@ -49,11 +47,6 @@ public abstract class Type extends Node { super(range); } - @Deprecated - public Type(int beginLine, int beginColumn, int endLine, int endColumn, List<AnnotationExpr> annotations) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), annotations); - } - public Type(Range range, List<AnnotationExpr> annotations) { super(range); this.annotations = annotations; 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 a3e977772..d37613be5 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 @@ -6,8 +6,6 @@ import com.github.javaparser.ast.visitor.VoidVisitor; import java.util.List; -import static com.github.javaparser.Position.pos; - /** * Represents a set of types. A given value of this type has to be assignable to at least one of the element types. * As of Java 8 it is only used in catch clauses. @@ -16,15 +14,6 @@ public class UnionType extends Type { private List<ReferenceType> elements; - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public UnionType(int beginLine, int beginColumn, int endLine, - int endColumn, List<ReferenceType> elements) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), elements); - } - public UnionType(Range range, List<ReferenceType> elements) { super(range); setElements(elements); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/type/VoidType.java b/javaparser-core/src/main/java/com/github/javaparser/ast/type/VoidType.java index 342051a5f..2be8ea7f7 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/type/VoidType.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/type/VoidType.java @@ -21,13 +21,10 @@ package com.github.javaparser.ast.type; -import com.github.javaparser.Position; import com.github.javaparser.Range; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * @author Julio Vilmar Gesser */ @@ -40,14 +37,6 @@ public final class VoidType extends Type { super(range); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public VoidType(final int beginLine, final int beginColumn, final int endLine, final int endColumn) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn))); - } - @Override public <R, A> R accept(final GenericVisitor<R, A> v, final A arg) { return v.visit(this, arg); } 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 b32d7d437..7b1d2cbbb 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 @@ -25,8 +25,6 @@ import com.github.javaparser.Range; import com.github.javaparser.ast.visitor.GenericVisitor; import com.github.javaparser.ast.visitor.VoidVisitor; -import static com.github.javaparser.Position.pos; - /** * @author Julio Vilmar Gesser */ @@ -48,15 +46,6 @@ public final class WildcardType extends Type { setSuper(sup); } - /** - * @deprecated prefer using Range objects. - */ - @Deprecated - public WildcardType(final int beginLine, final int beginColumn, final int endLine, final int endColumn, - final ReferenceType ext, final ReferenceType sup) { - this(new Range(pos(beginLine, beginColumn), pos(endLine, endColumn)), ext, sup); - } - public WildcardType(final Range range, final ReferenceType ext, final ReferenceType sup) { super(range); diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/visitor/CloneVisitor.java b/javaparser-core/src/main/java/com/github/javaparser/ast/visitor/CloneVisitor.java index 0cba5da2d..dfe4be911 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/visitor/CloneVisitor.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/visitor/CloneVisitor.java @@ -166,8 +166,7 @@ public class CloneVisitor implements GenericVisitor<Node, Object> { List<ClassOrInterfaceType> typeBound = visit(_n.getTypeBound(), _arg); List<AnnotationExpr> annotations = visit(_n.getAnnotations(), _arg); - TypeParameter r = new TypeParameter(_n.getBegin().line, - _n.getBegin().column, _n.getEnd().line, _n.getEnd().column, + TypeParameter r = new TypeParameter(_n.getRange(), _n.getName(), typeBound, annotations); Comment comment = cloneNodes(_n.getComment(), _arg); @@ -328,7 +327,7 @@ public class CloneVisitor implements GenericVisitor<Node, Object> { List<TypeParameter> typeParameters = visit(_n.getTypeParameters(), _arg); List<Parameter> parameters = visit(_n.getParameters(), _arg); List<ReferenceType> throws_ = visit(_n.getThrows(), _arg); - BlockStmt block = cloneNodes(_n.getBlock(), _arg); + BlockStmt block = cloneNodes(_n.getBody(), _arg); Comment comment = cloneNodes(_n.getComment(), _arg); ConstructorDeclaration r = new ConstructorDeclaration( diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/visitor/DumpVisitor.java b/javaparser-core/src/main/java/com/github/javaparser/ast/visitor/DumpVisitor.java index ea5abb8d9..ea00e090b 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/visitor/DumpVisitor.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/visitor/DumpVisitor.java @@ -1044,7 +1044,7 @@ public class DumpVisitor implements VoidVisitor<Object> { } } printer.print(" "); - n.getBlock().accept(this, arg); + n.getBody().accept(this, arg); } @Override public void visit(final MethodDeclaration n, final Object arg) { diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/visitor/EqualsVisitor.java b/javaparser-core/src/main/java/com/github/javaparser/ast/visitor/EqualsVisitor.java index 73d043864..f3489b615 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/visitor/EqualsVisitor.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/visitor/EqualsVisitor.java @@ -493,7 +493,7 @@ public class EqualsVisitor implements GenericVisitor<Boolean, Node> { return false; } - if (!nodeEquals(n1.getBlock(), n2.getBlock())) { + if (!nodeEquals(n1.getBody(), n2.getBody())) { return false; } diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/visitor/GenericVisitorAdapter.java b/javaparser-core/src/main/java/com/github/javaparser/ast/visitor/GenericVisitorAdapter.java index cd2dabc4b..2fef38fbf 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/visitor/GenericVisitorAdapter.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/visitor/GenericVisitorAdapter.java @@ -572,7 +572,7 @@ public abstract class GenericVisitorAdapter<R, A> implements GenericVisitor<R, A } } { - R result = n.getBlock().accept(this, arg); + R result = n.getBody().accept(this, arg); if (result != null) { return result; } diff --git a/javaparser-core/src/main/java/com/github/javaparser/ast/visitor/ModifierVisitorAdapter.java b/javaparser-core/src/main/java/com/github/javaparser/ast/visitor/ModifierVisitorAdapter.java index 418d37394..398e763d1 100644 --- a/javaparser-core/src/main/java/com/github/javaparser/ast/visitor/ModifierVisitorAdapter.java +++ b/javaparser-core/src/main/java/com/github/javaparser/ast/visitor/ModifierVisitorAdapter.java @@ -401,7 +401,7 @@ public abstract class ModifierVisitorAdapter<A> implements GenericVisitor<Node, } removeNulls(throwz); } - n.setBlock((BlockStmt) n.getBlock().accept(this, arg)); + n.setBody((BlockStmt) n.getBody().accept(this, arg)); return n; } 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 bc38cd8e2..65abfc456 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 @@ -331,7 +331,7 @@ public abstract class VoidVisitorAdapter<A> implements VoidVisitor<A> { name.accept(this, arg); } } - n.getBlock().accept(this, arg); + n.getBody().accept(this, arg); } @Override public void visit(final ContinueStmt n, final A arg) { |