Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 18782 Details for
Bug 69657
[dom] deprecate JLS2 once JLS3 is fully supported
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch to deprecate JLS2 in DOM/AST
jdt-core-patch-20050314.txt (text/plain), 184.22 KB, created by
Jim des Rivieres
on 2005-03-14 19:51:37 EST
(
hide
)
Description:
Patch to deprecate JLS2 in DOM/AST
Filename:
MIME Type:
Creator:
Jim des Rivieres
Created:
2005-03-14 19:51:37 EST
Size:
184.22 KB
patch
obsolete
>Index: dom/org/eclipse/jdt/core/dom/AST.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AST.java,v >retrieving revision 1.137 >diff -u -r1.137 AST.java >--- dom/org/eclipse/jdt/core/dom/AST.java 12 Mar 2005 02:09:38 -0000 1.137 >+++ dom/org/eclipse/jdt/core/dom/AST.java 15 Mar 2005 00:39:04 -0000 >@@ -95,11 +95,18 @@ > * up to and including J2SE 1.4. > * > * @since 3.0 >+ * @deprecated Clients should use the {@link #JLS3} AST API instead. > */ >- // TODO (jeem) When JLS3 support is complete (post 3.0) - deprecated Clients should use the JLS3 API. > public static final int JLS2 = 2; > > /** >+ * Internal synonym for {@link #JLS2}. Use to alleviate >+ * deprecation warnings. >+ * @since 3.1 >+ */ >+ /*package*/ static final int JLS2_INTERNAL = JLS2; >+ >+ /** > * Constant for indicating the AST API that handles JLS3. > * This API is capable of handling all constructs in the > * Java language as described in the Java Language >@@ -107,15 +114,9 @@ > * JLS3 is a superset of all earlier versions of the > * Java language, and the JLS3 API can be used to manipulate > * programs written in all versions of the Java language >- * up to and including J2SE 1.5. >- * <p> >- * <b>NOTE:</b>In Eclipse 3.0, there is no underlying parser support for >- * JLS3 ASTs. This support is planned for the follow-on release of >- * Eclipse which includes support for J2SE 1.5. Without a parser to create >- * JLS3 ASTs, they are not much use. Use JLS2 ASTs instead. >- * </p> >+ * up to and including J2SE 5 (aka JDK 1.5). > * >- * @since 3.0 >+ * @since 3.1 > */ > public static final int JLS3 = 3; > >@@ -215,8 +216,9 @@ > * Creates a new, empty abstract syntax tree using default options. > * > * @see JavaCore#getDefaultOptions() >+ * @deprecated Clients should port their code to use the new JLS3 AST API and call >+ * {@link #newAST(int) AST.newAST(AST.JLS3)} instead of using this constructor. > */ >- // TODO (jeem) When JLS3 support is complete (post 3.0) - deprecated Clients should port their code to use the new JLS3 API and call {@link #newAST(int)} instead of using this constructor. > public AST() { > this(JavaCore.getDefaultOptions()); > } >@@ -282,8 +284,9 @@ > * @param options the table of options (key type: <code>String</code>; > * value type: <code>String</code>) > * @see JavaCore#getDefaultOptions() >+ * @deprecated Clients should port their code to use the new JLS3 AST API and call >+ * {@link #newAST(int) AST.newAST(AST.JLS3)} instead of using this constructor. > */ >- // TODO (jeem) When JLS3 support is complete (post 3.0) - deprecated Clients should port their code to use the new JLS3 API and call {@link #newAST(int)} instead of using this constructor. > public AST(Map options) { > this(JLS2); > Object sourceLevelOption = options.get(JavaCore.COMPILER_SOURCE); >@@ -308,8 +311,8 @@ > * Creates a new Java abstract syntax tree > * (AST) following the specified set of API rules. > * <p> >- * Clients should use this method. It is provided only so that >- * test suites can create AST instances that employ the JLS2 APIs. >+ * Clients should use this method specifing {@link #JLS3} as the >+ * AST level in all cases, even when dealing with JDK 1.3 or 1.4.. > * </p> > * > * @param level the API level; one of the LEVEL constants >@@ -1447,7 +1450,7 @@ > * </ul> > * @exception UnsupportedOperationException if this operation is used in > * a JLS2 AST >- * @since 3.0 >+ * @since 3.1 > */ > public ParameterizedType newParameterizedType(Type type) { > ParameterizedType result = new ParameterizedType(this); >@@ -1469,7 +1472,7 @@ > * </ul> > * @exception UnsupportedOperationException if this operation is used in > * a JLS2 AST >- * @since 3.0 >+ * @since 3.1 > */ > public QualifiedType newQualifiedType(Type qualifier, SimpleName name) { > QualifiedType result = new QualifiedType(this); >@@ -1485,7 +1488,7 @@ > * @return a new unparented wildcard type node > * @exception UnsupportedOperationException if this operation is used in > * a JLS2 AST >- * @since 3.0 >+ * @since 3.1 > */ > public WildcardType newWildcardType() { > WildcardType result = new WildcardType(this); >@@ -1621,7 +1624,7 @@ > * @return a new unparented enum constant declaration node > * @exception UnsupportedOperationException if this operation is used in > * a JLS2 AST >- * @since 3.0 >+ * @since 3.1 > */ > public EnumConstantDeclaration newEnumConstantDeclaration() { > EnumConstantDeclaration result = new EnumConstantDeclaration(this); >@@ -1638,7 +1641,7 @@ > * @return a new unparented enum declaration node > * @exception UnsupportedOperationException if this operation is used in > * a JLS2 AST >- * @since 3.0 >+ * @since 3.1 > */ > public EnumDeclaration newEnumDeclaration() { > EnumDeclaration result = new EnumDeclaration(this); >@@ -1652,7 +1655,7 @@ > * @return a new unparented type parameter node > * @exception UnsupportedOperationException if this operation is used in > * a JLS2 AST >- * @since 3.0 >+ * @since 3.1 > */ > public TypeParameter newTypeParameter() { > TypeParameter result = new TypeParameter(this); >@@ -1667,7 +1670,7 @@ > * @return a new unparented annotation type declaration node > * @exception UnsupportedOperationException if this operation is used in > * a JLS2 AST >- * @since 3.0 >+ * @since 3.1 > */ > public AnnotationTypeDeclaration newAnnotationTypeDeclaration() { > AnnotationTypeDeclaration result = new AnnotationTypeDeclaration(this); >@@ -1683,7 +1686,7 @@ > * @return a new unparented annotation type member declaration node > * @exception UnsupportedOperationException if this operation is used in > * a JLS2 AST >- * @since 3.0 >+ * @since 3.1 > */ > public AnnotationTypeMemberDeclaration newAnnotationTypeMemberDeclaration() { > AnnotationTypeMemberDeclaration result = new AnnotationTypeMemberDeclaration(this); >@@ -1699,7 +1702,7 @@ > * @exception IllegalArgumentException if the primitive type code is invalid > * @exception UnsupportedOperationException if this operation is used in > * a JLS2 AST >- * @since 3.0 >+ * @since 3.1 > */ > public Modifier newModifier(Modifier.ModifierKeyword keyword) { > Modifier result = new Modifier(this); >@@ -1980,7 +1983,7 @@ > newTypeDeclarationStatement(AbstractTypeDeclaration decl) { > TypeDeclarationStatement result = new TypeDeclarationStatement(this); > if (this.apiLevel == AST.JLS2) { >- result.setTypeDeclaration((TypeDeclaration) decl); >+ result.internalSetTypeDeclaration((TypeDeclaration) decl); > } > if (this.apiLevel >= AST.JLS3) { > result.setDeclaration(decl); >@@ -2200,7 +2203,7 @@ > * @return a new unparented throw statement node > * @exception UnsupportedOperationException if this operation is used in > * a JLS2 AST >- * @since 3.0 >+ * @since 3.1 > */ > public EnhancedForStatement newEnhancedForStatement() { > return new EnhancedForStatement(this); >@@ -2660,7 +2663,7 @@ > * @return a new unparented normal annotation node > * @exception UnsupportedOperationException if this operation is used in > * a JLS2 AST >- * @since 3.0 >+ * @since 3.1 > */ > public NormalAnnotation newNormalAnnotation() { > NormalAnnotation result = new NormalAnnotation(this); >@@ -2674,7 +2677,7 @@ > * @return a new unparented marker annotation node > * @exception UnsupportedOperationException if this operation is used in > * a JLS2 AST >- * @since 3.0 >+ * @since 3.1 > */ > public MarkerAnnotation newMarkerAnnotation() { > MarkerAnnotation result = new MarkerAnnotation(this); >@@ -2688,7 +2691,7 @@ > * @return a new unparented single member annotation node > * @exception UnsupportedOperationException if this operation is used in > * a JLS2 AST >- * @since 3.0 >+ * @since 3.1 > */ > public SingleMemberAnnotation newSingleMemberAnnotation() { > SingleMemberAnnotation result = new SingleMemberAnnotation(this); >@@ -2702,7 +2705,7 @@ > * @return a new unparented member value pair node > * @exception UnsupportedOperationException if this operation is used in > * a JLS2 AST >- * @since 3.0 >+ * @since 3.1 > */ > public MemberValuePair newMemberValuePair() { > MemberValuePair result = new MemberValuePair(this); >Index: dom/org/eclipse/jdt/core/dom/ASTConverter.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java,v >retrieving revision 1.199 >diff -u -r1.199 ASTConverter.java >--- dom/org/eclipse/jdt/core/dom/ASTConverter.java 14 Mar 2005 18:20:43 -0000 1.199 >+++ dom/org/eclipse/jdt/core/dom/ASTConverter.java 15 Mar 2005 00:39:05 -0000 >@@ -447,11 +447,11 @@ > org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration constructorDeclaration = (org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration) methodDeclaration; > explicitConstructorCall = constructorDeclaration.constructorCall; > switch(this.ast.apiLevel) { >- case AST.JLS2 : >+ case AST.JLS2_INTERNAL : > // set the return type to VOID > PrimitiveType returnType = this.ast.newPrimitiveType(PrimitiveType.VOID); > returnType.setSourceRange(methodDeclaration.sourceStart, 0); >- methodDecl.setReturnType(returnType); >+ methodDecl.internalSetReturnType(returnType); > break; > case AST.JLS3 : > methodDecl.setReturnType2(null); >@@ -537,7 +537,7 @@ > org.eclipse.jdt.internal.compiler.ast.TypeParameter[] typeParameters = methodDeclaration.typeParameters(); > if (typeParameters != null) { > switch(this.ast.apiLevel) { >- case AST.JLS2 : >+ case AST.JLS2_INTERNAL : > methodDecl.setFlags(methodDecl.getFlags() | ASTNode.MALFORMED); > break; > case AST.JLS3 : >@@ -564,7 +564,7 @@ > } > if (expression.typeArguments != null) { > switch(this.ast.apiLevel) { >- case AST.JLS2 : >+ case AST.JLS2_INTERNAL : > classInstanceCreation.setFlags(classInstanceCreation.getFlags() | ASTNode.MALFORMED); > break; > case AST.JLS3 : >@@ -574,8 +574,8 @@ > } > } > switch(this.ast.apiLevel) { >- case AST.JLS2 : >- classInstanceCreation.setName(convert(expression.type)); >+ case AST.JLS2_INTERNAL : >+ classInstanceCreation.internalSetName(convert(expression.type)); > break; > case AST.JLS3 : > classInstanceCreation.setType(convertType(expression.type)); >@@ -628,7 +628,7 @@ > > public ASTNode convert(org.eclipse.jdt.internal.compiler.ast.AnnotationMethodDeclaration annotationTypeMemberDeclaration) { > checkCanceled(); >- if (this.ast.apiLevel == AST.JLS2) { >+ if (this.ast.apiLevel == AST.JLS2_INTERNAL) { > return null; > } > AnnotationTypeMemberDeclaration annotationTypeMemberDeclaration2 = this.ast.newAnnotationTypeMemberDeclaration(); >@@ -695,7 +695,7 @@ > > if (isVarArgs) { > switch(this.ast.apiLevel) { >- case AST.JLS2 : >+ case AST.JLS2_INTERNAL : > variableDecl.setFlags(variableDecl.getFlags() | ASTNode.MALFORMED); > break; > case AST.JLS3 : >@@ -1366,7 +1366,7 @@ > sourceStart = statement.typeArgumentsSourceStart; > } > switch(this.ast.apiLevel) { >- case AST.JLS2 : >+ case AST.JLS2_INTERNAL : > superConstructorInvocation.setFlags(superConstructorInvocation.getFlags() | ASTNode.MALFORMED); > break; > case AST.JLS3 : >@@ -1391,7 +1391,7 @@ > sourceStart = statement.typeArgumentsSourceStart; > } > switch(this.ast.apiLevel) { >- case AST.JLS2 : >+ case AST.JLS2_INTERNAL : > constructorInvocation.setFlags(constructorInvocation.getFlags() | ASTNode.MALFORMED); > break; > case AST.JLS3 : >@@ -1604,7 +1604,7 @@ > > public Statement convert(ForeachStatement statement) { > switch(this.ast.apiLevel) { >- case AST.JLS2 : >+ case AST.JLS2_INTERNAL : > return createFakeEmptyStatement(statement); > case AST.JLS3 : > EnhancedForStatement enhancedForStatement = this.ast.newEnhancedForStatement(); >@@ -1822,7 +1822,7 @@ > final TypeReference[] typeArguments = expression.typeArguments; > if (typeArguments != null) { > switch(this.ast.apiLevel) { >- case AST.JLS2 : >+ case AST.JLS2_INTERNAL : > superMethodInvocation.setFlags(superMethodInvocation.getFlags() | ASTNode.MALFORMED); > break; > case AST.JLS3 : >@@ -1879,7 +1879,7 @@ > final TypeReference[] typeArguments = expression.typeArguments; > if (typeArguments != null) { > switch(this.ast.apiLevel) { >- case AST.JLS2 : >+ case AST.JLS2_INTERNAL : > methodInvocation.setFlags(methodInvocation.getFlags() | ASTNode.MALFORMED); > break; > case AST.JLS3 : >@@ -2033,8 +2033,8 @@ > classInstanceCreation.setExpression(convert(allocation.enclosingInstance)); > } > switch(this.ast.apiLevel) { >- case AST.JLS2 : >- classInstanceCreation.setName(convert(allocation.type)); >+ case AST.JLS2_INTERNAL : >+ classInstanceCreation.internalSetName(convert(allocation.type)); > break; > case AST.JLS3 : > classInstanceCreation.setType(convertType(allocation.type)); >@@ -2052,7 +2052,7 @@ > } > if (allocation.typeArguments != null) { > switch(this.ast.apiLevel) { >- case AST.JLS2 : >+ case AST.JLS2_INTERNAL : > classInstanceCreation.setFlags(classInstanceCreation.getFlags() | ASTNode.MALFORMED); > break; > case AST.JLS3 : >@@ -2216,22 +2216,22 @@ > switch(result.getNodeType()) { > case ASTNode.ENUM_DECLARATION: > switch(this.ast.apiLevel) { >- case AST.JLS2 : >+ case AST.JLS2_INTERNAL : > return createFakeEmptyStatement(statement); > case AST.JLS3 : > TypeDeclarationStatement typeDeclarationStatement = this.ast.newTypeDeclarationStatement((EnumDeclaration) result); >- TypeDeclaration typeDecl = typeDeclarationStatement.getTypeDeclaration(); >+ AbstractTypeDeclaration typeDecl = typeDeclarationStatement.getDeclaration(); > typeDeclarationStatement.setSourceRange(typeDecl.getStartPosition(), typeDecl.getLength()); > return typeDeclarationStatement; > } > break; > case ASTNode.ANNOTATION_TYPE_DECLARATION : > switch(this.ast.apiLevel) { >- case AST.JLS2 : >+ case AST.JLS2_INTERNAL : > return createFakeEmptyStatement(statement); > case AST.JLS3 : > TypeDeclarationStatement typeDeclarationStatement = this.ast.newTypeDeclarationStatement((AnnotationTypeDeclaration) result); >- TypeDeclaration typeDecl = typeDeclarationStatement.getTypeDeclaration(); >+ AbstractTypeDeclaration typeDecl = typeDeclarationStatement.getDeclaration(); > typeDeclarationStatement.setSourceRange(typeDecl.getStartPosition(), typeDecl.getLength()); > return typeDeclarationStatement; > } >@@ -2243,8 +2243,8 @@ > } else { > TypeDeclarationStatement typeDeclarationStatement = this.ast.newTypeDeclarationStatement(typeDeclaration); > switch(this.ast.apiLevel) { >- case AST.JLS2 : >- TypeDeclaration typeDecl = typeDeclarationStatement.getTypeDeclaration(); >+ case AST.JLS2_INTERNAL : >+ TypeDeclaration typeDecl = typeDeclarationStatement.internalGetTypeDeclaration(); > typeDeclarationStatement.setSourceRange(typeDecl.getStartPosition(), typeDecl.getLength()); > break; > case AST.JLS3 : >@@ -2373,13 +2373,13 @@ > public ASTNode convert(org.eclipse.jdt.internal.compiler.ast.TypeDeclaration typeDeclaration) { > switch (typeDeclaration.kind()) { > case IGenericType.ENUM_DECL : >- if (this.ast.apiLevel == AST.JLS2) { >+ if (this.ast.apiLevel == AST.JLS2_INTERNAL) { > return null; > } else { > return convertToEnumDeclaration(typeDeclaration); > } > case IGenericType.ANNOTATION_TYPE_DECL : >- if (this.ast.apiLevel == AST.JLS2) { >+ if (this.ast.apiLevel == AST.JLS2_INTERNAL) { > return null; > } else { > return convertToAnnotationDeclaration(typeDeclaration); >@@ -2401,8 +2401,8 @@ > // the type references level. > if (typeDeclaration.superclass != null) { > switch(this.ast.apiLevel) { >- case AST.JLS2 : >- typeDecl.setSuperclass(convert(typeDeclaration.superclass)); >+ case AST.JLS2_INTERNAL : >+ typeDecl.internalSetSuperclass(convert(typeDeclaration.superclass)); > break; > case AST.JLS3 : > typeDecl.setSuperclassType(convertType(typeDeclaration.superclass)); >@@ -2413,9 +2413,9 @@ > org.eclipse.jdt.internal.compiler.ast.TypeReference[] superInterfaces = typeDeclaration.superInterfaces; > if (superInterfaces != null) { > switch(this.ast.apiLevel) { >- case AST.JLS2 : >+ case AST.JLS2_INTERNAL : > for (int index = 0, length = superInterfaces.length; index < length; index++) { >- typeDecl.superInterfaces().add(convert(superInterfaces[index])); >+ typeDecl.internalSuperInterfaces().add(convert(superInterfaces[index])); > } > break; > case AST.JLS3 : >@@ -2427,7 +2427,7 @@ > org.eclipse.jdt.internal.compiler.ast.TypeParameter[] typeParameters = typeDeclaration.typeParameters; > if (typeParameters != null) { > switch(this.ast.apiLevel) { >- case AST.JLS2 : >+ case AST.JLS2_INTERNAL : > typeDecl.setFlags(typeDecl.getFlags() | ASTNode.MALFORMED); > break; > case AST.JLS3 : >@@ -2551,7 +2551,7 @@ > int modifiers = importReference.modifiers; > if (modifiers != IConstants.AccDefault) { > switch(this.ast.apiLevel) { >- case AST.JLS2 : >+ case AST.JLS2_INTERNAL : > importDeclaration.setFlags(importDeclaration.getFlags() | ASTNode.MALFORMED); > break; > case AST.JLS3 : >@@ -2588,7 +2588,7 @@ > org.eclipse.jdt.internal.compiler.ast.Annotation[] annotations = importReference.annotations; > if (annotations != null) { > switch(this.ast.apiLevel) { >- case AST.JLS2 : >+ case AST.JLS2_INTERNAL : > packageDeclaration.setFlags(packageDeclaration.getFlags() & ASTNode.MALFORMED); > break; > case AST.JLS3 : >@@ -2828,7 +2828,7 @@ > } > simpleName.setSourceRange(sourceStart, end - sourceStart + 1); > switch(this.ast.apiLevel) { >- case AST.JLS2 : >+ case AST.JLS2_INTERNAL : > type = this.ast.newSimpleType(simpleName); > type.setFlags(type.getFlags() | ASTNode.MALFORMED); > type.setSourceRange(sourceStart, end - sourceStart + 1); >@@ -2889,7 +2889,7 @@ > long[] positions = parameterizedQualifiedTypeReference.sourcePositions; > sourceStart = (int)(positions[0]>>>32); > switch(this.ast.apiLevel) { >- case AST.JLS2 : { >+ case AST.JLS2_INTERNAL : { > char[][] name = ((org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference) typeReference).getTypeName(); > int nameLength = name.length; > sourceStart = (int)(positions[0]>>>32); >@@ -3417,7 +3417,7 @@ > if (expression instanceof JavadocArgumentExpression) { > JavadocArgumentExpression argExpr = (JavadocArgumentExpression) expression; > org.eclipse.jdt.internal.compiler.ast.TypeReference typeRef = argExpr.argument.type; >- if (this.ast.apiLevel != AST.JLS2) param.setVarargs(argExpr.argument.isVarArgs()); >+ if (this.ast.apiLevel >= AST.JLS3) param.setVarargs(argExpr.argument.isVarArgs()); > recordNodes(param.getType(), typeRef); > if (param.getType().isSimpleType()) { > recordName(((SimpleType)param.getType()).getName(), typeRef); >@@ -4144,8 +4144,8 @@ > */ > protected void setModifiers(FieldDeclaration fieldDeclaration, org.eclipse.jdt.internal.compiler.ast.FieldDeclaration fieldDecl) { > switch(this.ast.apiLevel) { >- case AST.JLS2 : >- fieldDeclaration.setModifiers(fieldDecl.modifiers & CompilerModifiers.AccJustFlag); >+ case AST.JLS2_INTERNAL : >+ fieldDeclaration.internalSetModifiers(fieldDecl.modifiers & CompilerModifiers.AccJustFlag); > if (fieldDecl.annotations != null) { > fieldDeclaration.setFlags(fieldDeclaration.getFlags() | ASTNode.MALFORMED); > } >@@ -4162,8 +4162,8 @@ > */ > protected void setModifiers(Initializer initializer, org.eclipse.jdt.internal.compiler.ast.Initializer oldInitializer) { > switch(this.ast.apiLevel) { >- case AST.JLS2: >- initializer.setModifiers(oldInitializer.modifiers & CompilerModifiers.AccJustFlag); >+ case AST.JLS2_INTERNAL: >+ initializer.internalSetModifiers(oldInitializer.modifiers & CompilerModifiers.AccJustFlag); > if (oldInitializer.annotations != null) { > initializer.setFlags(initializer.getFlags() | ASTNode.MALFORMED); > } >@@ -4179,8 +4179,8 @@ > */ > protected void setModifiers(MethodDeclaration methodDecl, AbstractMethodDeclaration methodDeclaration) { > switch(this.ast.apiLevel) { >- case AST.JLS2 : >- methodDecl.setModifiers(methodDeclaration.modifiers & CompilerModifiers.AccJustFlag); >+ case AST.JLS2_INTERNAL : >+ methodDecl.internalSetModifiers(methodDeclaration.modifiers & CompilerModifiers.AccJustFlag); > if (methodDeclaration.annotations != null) { > methodDecl.setFlags(methodDecl.getFlags() | ASTNode.MALFORMED); > } >@@ -4197,8 +4197,8 @@ > */ > protected void setModifiers(SingleVariableDeclaration variableDecl, Argument argument) { > switch(this.ast.apiLevel) { >- case AST.JLS2 : >- variableDecl.setModifiers(argument.modifiers & CompilerModifiers.AccJustFlag); >+ case AST.JLS2_INTERNAL : >+ variableDecl.internalSetModifiers(argument.modifiers & CompilerModifiers.AccJustFlag); > if (argument.annotations != null) { > variableDecl.setFlags(variableDecl.getFlags() | ASTNode.MALFORMED); > } >@@ -4265,8 +4265,8 @@ > > protected void setModifiers(SingleVariableDeclaration variableDecl, LocalDeclaration localDeclaration) { > switch(this.ast.apiLevel) { >- case AST.JLS2 : >- variableDecl.setModifiers(localDeclaration.modifiers & CompilerModifiers.AccJustFlag); >+ case AST.JLS2_INTERNAL : >+ variableDecl.internalSetModifiers(localDeclaration.modifiers & CompilerModifiers.AccJustFlag); > if (localDeclaration.annotations != null) { > variableDecl.setFlags(variableDecl.getFlags() | ASTNode.MALFORMED); > } >@@ -4337,11 +4337,11 @@ > */ > protected void setModifiers(TypeDeclaration typeDecl, org.eclipse.jdt.internal.compiler.ast.TypeDeclaration typeDeclaration) { > switch(this.ast.apiLevel) { >- case AST.JLS2 : >+ case AST.JLS2_INTERNAL : > int modifiers = typeDeclaration.modifiers; > modifiers &= ~IConstants.AccInterface; // remove AccInterface flags > modifiers &= CompilerModifiers.AccJustFlag; >- typeDecl.setModifiers(modifiers); >+ typeDecl.internalSetModifiers(modifiers); > if (typeDeclaration.annotations != null) { > typeDecl.setFlags(typeDecl.getFlags() | ASTNode.MALFORMED); > } >@@ -4358,10 +4358,10 @@ > */ > protected void setModifiers(VariableDeclarationExpression variableDeclarationExpression, LocalDeclaration localDeclaration) { > switch(this.ast.apiLevel) { >- case AST.JLS2 : >+ case AST.JLS2_INTERNAL : > int modifiers = localDeclaration.modifiers & CompilerModifiers.AccJustFlag; > modifiers &= ~CompilerModifiers.AccBlankFinal; >- variableDeclarationExpression.setModifiers(modifiers); >+ variableDeclarationExpression.internalSetModifiers(modifiers); > if (localDeclaration.annotations != null) { > variableDeclarationExpression.setFlags(variableDeclarationExpression.getFlags() | ASTNode.MALFORMED); > } >@@ -4432,10 +4432,10 @@ > */ > protected void setModifiers(VariableDeclarationStatement variableDeclarationStatement, LocalDeclaration localDeclaration) { > switch(this.ast.apiLevel) { >- case AST.JLS2 : >+ case AST.JLS2_INTERNAL : > int modifiers = localDeclaration.modifiers & CompilerModifiers.AccJustFlag; > modifiers &= ~CompilerModifiers.AccBlankFinal; >- variableDeclarationStatement.setModifiers(modifiers); >+ variableDeclarationStatement.internalSetModifiers(modifiers); > if (localDeclaration.annotations != null) { > variableDeclarationStatement.setFlags(variableDeclarationStatement.getFlags() | ASTNode.MALFORMED); > } >@@ -4672,8 +4672,8 @@ > elementType.setParent(null, null); > this.ast.getBindingResolver().updateKey(type, elementType); > switch(this.ast.apiLevel) { >- case AST.JLS2 : >- methodDeclaration.setReturnType(elementType); >+ case AST.JLS2_INTERNAL : >+ methodDeclaration.internalSetReturnType(elementType); > break; > case AST.JLS3 : > methodDeclaration.setReturnType2(elementType); >@@ -4693,8 +4693,8 @@ > subarrayType.setParent(null, null); > updateInnerPositions(subarrayType, remainingDimensions); > switch(this.ast.apiLevel) { >- case AST.JLS2 : >- methodDeclaration.setReturnType(subarrayType); >+ case AST.JLS2_INTERNAL : >+ methodDeclaration.internalSetReturnType(subarrayType); > break; > case AST.JLS3 : > methodDeclaration.setReturnType2(subarrayType); >@@ -4704,8 +4704,8 @@ > } > } else { > switch(this.ast.apiLevel) { >- case AST.JLS2 : >- methodDeclaration.setReturnType(type); >+ case AST.JLS2_INTERNAL : >+ methodDeclaration.internalSetReturnType(type); > break; > case AST.JLS3 : > methodDeclaration.setReturnType2(type); >@@ -4714,8 +4714,8 @@ > } > } else { > switch(this.ast.apiLevel) { >- case AST.JLS2 : >- methodDeclaration.setReturnType(type); >+ case AST.JLS2_INTERNAL : >+ methodDeclaration.internalSetReturnType(type); > break; > case AST.JLS3 : > methodDeclaration.setReturnType2(type); >Index: dom/org/eclipse/jdt/core/dom/ASTMatcher.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTMatcher.java,v >retrieving revision 1.40 >diff -u -r1.40 ASTMatcher.java >--- dom/org/eclipse/jdt/core/dom/ASTMatcher.java 11 Mar 2005 23:39:33 -0000 1.40 >+++ dom/org/eclipse/jdt/core/dom/ASTMatcher.java 15 Mar 2005 00:39:05 -0000 >@@ -172,7 +172,7 @@ > * @return <code>true</code> if the subtree matches, or > * <code>false</code> if they do not match or the other object has a > * different node type or is <code>null</code> >- * @since 3.0 >+ * @since 3.1 > */ > public boolean match(AnnotationTypeDeclaration node, Object other) { > if (!(other instanceof AnnotationTypeDeclaration)) { >@@ -199,7 +199,7 @@ > * @return <code>true</code> if the subtree matches, or > * <code>false</code> if they do not match or the other object has a > * different node type or is <code>null</code> >- * @since 3.0 >+ * @since 3.1 > */ > public boolean match(AnnotationTypeMemberDeclaration node, Object other) { > if (!(other instanceof AnnotationTypeMemberDeclaration)) { >@@ -561,8 +561,8 @@ > } > ClassInstanceCreation o = (ClassInstanceCreation) other; > int level = node.getAST().apiLevel; >- if (level == AST.JLS2) { >- if (!safeSubtreeMatch(node.getName(), o.getName())) { >+ if (level == AST.JLS2_INTERNAL) { >+ if (!safeSubtreeMatch(node.internalGetName(), o.internalGetName())) { > return false; > } > } >@@ -739,7 +739,7 @@ > * @return <code>true</code> if the subtree matches, or > * <code>false</code> if they do not match or the other object has a > * different node type or is <code>null</code> >- * @since 3.0 >+ * @since 3.1 > */ > public boolean match(EnhancedForStatement node, Object other) { > if (!(other instanceof EnhancedForStatement)) { >@@ -759,19 +759,13 @@ > * other object is a node of the same type with structurally isomorphic > * child subtrees. Subclasses may override this method as needed. > * </p> >- * <p> >- * Note: This API element is only needed for dealing with Java code that uses >- * new language features of J2SE 1.5. It is included in anticipation of J2SE >- * 1.5 support, which is planned for the next release of Eclipse after 3.0, and >- * may change slightly before reaching its final form. >- * </p> > * > * @param node the node > * @param other the other object, or <code>null</code> > * @return <code>true</code> if the subtree matches, or > * <code>false</code> if they do not match or the other object has a > * different node type or is <code>null</code> >- * @since 3.0 >+ * @since 3.1 > */ > public boolean match(EnumConstantDeclaration node, Object other) { > if (!(other instanceof EnumConstantDeclaration)) { >@@ -804,7 +798,7 @@ > * @return <code>true</code> if the subtree matches, or > * <code>false</code> if they do not match or the other object has a > * different node type or is <code>null</code> >- * @since 3.0 >+ * @since 3.1 > */ > public boolean match(EnumDeclaration node, Object other) { > if (!(other instanceof EnumDeclaration)) { >@@ -888,7 +882,7 @@ > } > FieldDeclaration o = (FieldDeclaration) other; > int level = node.getAST().apiLevel; >- if (level == AST.JLS2) { >+ if (level == AST.JLS2_INTERNAL) { > if (node.getModifiers() != o.getModifiers()) { > return false; > } >@@ -1062,7 +1056,7 @@ > } > Initializer o = (Initializer) other; > int level = node.getAST().apiLevel; >- if (level == AST.JLS2) { >+ if (level == AST.JLS2_INTERNAL) { > if (node.getModifiers() != o.getModifiers()) { > return false; > } >@@ -1122,7 +1116,7 @@ > * @deprecated mark deprecated to hide deprecated usage > */ > private boolean compareDeprecatedComment(Javadoc first, Javadoc second) { >- if (first.getAST().apiLevel == AST.JLS2) { >+ if (first.getAST().apiLevel == AST.JLS2_INTERNAL) { > return safeEquals(first.getComment(), second.getComment()); > } else { > return true; >@@ -1193,7 +1187,7 @@ > * @return <code>true</code> if the subtree matches, or > * <code>false</code> if they do not match or the other object has a > * different node type or is <code>null</code> >- * @since 3.0 >+ * @since 3.1 > */ > public boolean match(MarkerAnnotation node, Object other) { > if (!(other instanceof MarkerAnnotation)) { >@@ -1241,7 +1235,7 @@ > * @return <code>true</code> if the subtree matches, or > * <code>false</code> if they do not match or the other object has a > * different node type or is <code>null</code> >- * @since 3.0 >+ * @since 3.1 > */ > public boolean match(MemberValuePair node, Object other) { > if (!(other instanceof MemberValuePair)) { >@@ -1337,11 +1331,11 @@ > } > MethodDeclaration o = (MethodDeclaration) other; > int level = node.getAST().apiLevel; >- if (level == AST.JLS2) { >+ if (level == AST.JLS2_INTERNAL) { > if (node.getModifiers() != o.getModifiers()) { > return false; > } >- if (!safeSubtreeMatch(node.getReturnType(), o.getReturnType())) { >+ if (!safeSubtreeMatch(node.internalGetReturnType(), o.internalGetReturnType())) { > return false; > } > } >@@ -1410,7 +1404,7 @@ > * @return <code>true</code> if the subtree matches, or > * <code>false</code> if they do not match or the other object has a > * different node type or is <code>null</code> >- * @since 3.0 >+ * @since 3.1 > */ > public boolean match(Modifier node, Object other) { > if (!(other instanceof Modifier)) { >@@ -1433,7 +1427,7 @@ > * @return <code>true</code> if the subtree matches, or > * <code>false</code> if they do not match or the other object has a > * different node type or is <code>null</code> >- * @since 3.0 >+ * @since 3.1 > */ > public boolean match(NormalAnnotation node, Object other) { > if (!(other instanceof NormalAnnotation)) { >@@ -1530,7 +1524,7 @@ > * @return <code>true</code> if the subtree matches, or > * <code>false</code> if they do not match or the other object has a > * different node type or is <code>null</code> >- * @since 3.0 >+ * @since 3.1 > */ > public boolean match(ParameterizedType node, Object other) { > if (!(other instanceof ParameterizedType)) { >@@ -1670,7 +1664,7 @@ > * @return <code>true</code> if the subtree matches, or > * <code>false</code> if they do not match or the other object has a > * different node type or is <code>null</code> >- * @since 3.0 >+ * @since 3.1 > */ > public boolean match(QualifiedType node, Object other) { > if (!(other instanceof QualifiedType)) { >@@ -1761,7 +1755,7 @@ > * @return <code>true</code> if the subtree matches, or > * <code>false</code> if they do not match or the other object has a > * different node type or is <code>null</code> >- * @since 3.0 >+ * @since 3.1 > */ > public boolean match(SingleMemberAnnotation node, Object other) { > if (!(other instanceof SingleMemberAnnotation)) { >@@ -1796,7 +1790,7 @@ > } > SingleVariableDeclaration o = (SingleVariableDeclaration) other; > int level = node.getAST().apiLevel; >- if (level == AST.JLS2) { >+ if (level == AST.JLS2_INTERNAL) { > if (node.getModifiers() != o.getModifiers()) { > return false; > } >@@ -2128,14 +2122,14 @@ > } > TypeDeclaration o = (TypeDeclaration) other; > int level = node.getAST().apiLevel; >- if (level == AST.JLS2) { >+ if (level == AST.JLS2_INTERNAL) { > if (node.getModifiers() != o.getModifiers()) { > return false; > } >- if (!safeSubtreeMatch(node.getSuperclass(), o.getSuperclass())) { >+ if (!safeSubtreeMatch(node.internalGetSuperclass(), o.internalGetSuperclass())) { > return false; > } >- if (!safeSubtreeListMatch(node.superInterfaces(), o.superInterfaces())) { >+ if (!safeSubtreeListMatch(node.internalSuperInterfaces(), o.internalSuperInterfaces())) { > return false; > } > } >@@ -2217,7 +2211,7 @@ > * @return <code>true</code> if the subtree matches, or > * <code>false</code> if they do not match or the other object has a > * different node type or is <code>null</code> >- * @since 3.0 >+ * @since 3.1 > */ > public boolean match(TypeParameter node, Object other) { > if (!(other instanceof TypeParameter)) { >@@ -2248,7 +2242,7 @@ > } > VariableDeclarationExpression o = (VariableDeclarationExpression) other; > int level = node.getAST().apiLevel; >- if (level == AST.JLS2) { >+ if (level == AST.JLS2_INTERNAL) { > if (node.getModifiers() != o.getModifiers()) { > return false; > } >@@ -2310,7 +2304,7 @@ > } > VariableDeclarationStatement o = (VariableDeclarationStatement) other; > int level = node.getAST().apiLevel; >- if (level == AST.JLS2) { >+ if (level == AST.JLS2_INTERNAL) { > if (node.getModifiers() != o.getModifiers()) { > return false; > } >@@ -2361,7 +2355,7 @@ > * @return <code>true</code> if the subtree matches, or > * <code>false</code> if they do not match or the other object has a > * different node type or is <code>null</code> >- * @since 3.0 >+ * @since 3.1 > */ > public boolean match(WildcardType node, Object other) { > if (!(other instanceof WildcardType)) { >Index: dom/org/eclipse/jdt/core/dom/ASTNode.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTNode.java,v >retrieving revision 1.64 >diff -u -r1.64 ASTNode.java >--- dom/org/eclipse/jdt/core/dom/ASTNode.java 23 Feb 2005 02:47:27 -0000 1.64 >+++ dom/org/eclipse/jdt/core/dom/ASTNode.java 15 Mar 2005 00:39:05 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2004 IBM Corporation and others. >+ * Copyright (c) 2000, 2005 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -647,7 +647,7 @@ > * Node type constant indicating a node of type > * <code>EnhancedForStatement</code>. > * @see EnhancedForStatement >- * @since 3.0 >+ * @since 3.1 > */ > public static final int ENHANCED_FOR_STATEMENT = 70; > >@@ -655,7 +655,7 @@ > * Node type constant indicating a node of type > * <code>EnumDeclaration</code>. > * @see EnumDeclaration >- * @since 3.0 >+ * @since 3.1 > */ > public static final int ENUM_DECLARATION = 71; > >@@ -663,7 +663,7 @@ > * Node type constant indicating a node of type > * <code>EnumConstantDeclaration</code>. > * @see EnumConstantDeclaration >- * @since 3.0 >+ * @since 3.1 > */ > public static final int ENUM_CONSTANT_DECLARATION = 72; > >@@ -671,7 +671,7 @@ > * Node type constant indicating a node of type > * <code>TypeParameter</code>. > * @see TypeParameter >- * @since 3.0 >+ * @since 3.1 > */ > public static final int TYPE_PARAMETER = 73; > >@@ -679,7 +679,7 @@ > * Node type constant indicating a node of type > * <code>ParameterizedType</code>. > * @see ParameterizedType >- * @since 3.0 >+ * @since 3.1 > */ > public static final int PARAMETERIZED_TYPE = 74; > >@@ -687,7 +687,7 @@ > * Node type constant indicating a node of type > * <code>QualifiedType</code>. > * @see QualifiedType >- * @since 3.0 >+ * @since 3.1 > */ > public static final int QUALIFIED_TYPE = 75; > >@@ -695,7 +695,7 @@ > * Node type constant indicating a node of type > * <code>WildcardType</code>. > * @see WildcardType >- * @since 3.0 >+ * @since 3.1 > */ > public static final int WILDCARD_TYPE = 76; > >@@ -703,7 +703,7 @@ > * Node type constant indicating a node of type > * <code>NormalAnnotation</code>. > * @see NormalAnnotation >- * @since 3.0 >+ * @since 3.1 > */ > public static final int NORMAL_ANNOTATION = 77; > >@@ -711,7 +711,7 @@ > * Node type constant indicating a node of type > * <code>MarkerAnnotation</code>. > * @see MarkerAnnotation >- * @since 3.0 >+ * @since 3.1 > */ > public static final int MARKER_ANNOTATION = 78; > >@@ -719,7 +719,7 @@ > * Node type constant indicating a node of type > * <code>SingleMemberAnnotation</code>. > * @see SingleMemberAnnotation >- * @since 3.0 >+ * @since 3.1 > */ > public static final int SINGLE_MEMBER_ANNOTATION = 79; > >@@ -727,7 +727,7 @@ > * Node type constant indicating a node of type > * <code>MemberValuePair</code>. > * @see MemberValuePair >- * @since 3.0 >+ * @since 3.1 > */ > public static final int MEMBER_VALUE_PAIR = 80; > >@@ -735,7 +735,7 @@ > * Node type constant indicating a node of type > * <code>AnnotationTypeDeclaration</code>. > * @see AnnotationTypeDeclaration >- * @since 3.0 >+ * @since 3.1 > */ > public static final int ANNOTATION_TYPE_DECLARATION = 81; > >@@ -743,7 +743,7 @@ > * Node type constant indicating a node of type > * <code>AnnotationTypeMemberDeclaration</code>. > * @see AnnotationTypeMemberDeclaration >- * @since 3.0 >+ * @since 3.1 > */ > public static final int ANNOTATION_TYPE_MEMBER_DECLARATION = 82; > >@@ -751,7 +751,7 @@ > * Node type constant indicating a node of type > * <code>Modifier</code>. > * @see Modifier >- * @since 3.0 >+ * @since 3.1 > */ > public static final int MODIFIER = 83; > >@@ -1754,7 +1754,7 @@ > * @since 3.0 > */ > final void unsupportedIn2() { >- if (this.ast.apiLevel == AST.JLS2) { >+ if (this.ast.apiLevel == AST.JLS2_INTERNAL) { > throw new UnsupportedOperationException("Operation not supported in JLS2 AST"); //$NON-NLS-1$ > } > } >@@ -1767,7 +1767,7 @@ > * @since 3.0 > */ > final void supportedOnlyIn2() { >- if (this.ast.apiLevel != AST.JLS2) { >+ if (this.ast.apiLevel != AST.JLS2_INTERNAL) { > throw new UnsupportedOperationException("Operation only supported in JLS2 AST"); //$NON-NLS-1$ > } > } >Index: dom/org/eclipse/jdt/core/dom/ASTParser.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTParser.java,v >retrieving revision 1.39 >diff -u -r1.39 ASTParser.java >--- dom/org/eclipse/jdt/core/dom/ASTParser.java 24 Feb 2005 17:09:57 -0000 1.39 >+++ dom/org/eclipse/jdt/core/dom/ASTParser.java 15 Mar 2005 00:39:05 -0000 >@@ -38,7 +38,7 @@ > * Example: Create basic AST from source string > * <pre> > * char[] source = ...; >- * ASTParser parser = ASTParser.newParser(AST.JLS2); // handles JLS2 (J2SE 1.4) >+ * ASTParser parser = ASTParser.newParser(AST.JLS3); // handles JDK 1.0, 1.1, 1.2, 1.3, 1.4, 1.5 > * parser.setSource(source); > * CompilationUnit result = (CompilationUnit) parser.createAST(null); > * </pre> >@@ -100,11 +100,6 @@ > /** > * Creates a new object for creating a Java abstract syntax tree > * (AST) following the specified set of API rules. >- * <p> >- * <b>NOTE:</b>In Eclipse 3.0, there is no parser support for >- * AST.JLS3. This support is planned for the follow-on release of >- * Eclipse which includes support for J2SE 1.5. >- * </p> > * > * @param level the API level; one of the LEVEL constants > * declared on <code>AST</code> >@@ -201,7 +196,7 @@ > * declared on <code>AST</code> > */ > ASTParser(int level) { >- if ((level != AST.JLS2) >+ if ((level != AST.JLS2_INTERNAL) > && (level != AST.JLS3)) { > throw new IllegalArgumentException(); > } >Index: dom/org/eclipse/jdt/core/dom/ASTRequestor.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTRequestor.java,v >retrieving revision 1.11 >diff -u -r1.11 ASTRequestor.java >--- dom/org/eclipse/jdt/core/dom/ASTRequestor.java 23 Feb 2005 02:47:27 -0000 1.11 >+++ dom/org/eclipse/jdt/core/dom/ASTRequestor.java 15 Mar 2005 00:39:05 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2004 IBM Corporation and others. >+ * Copyright (c) 2005 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >Index: dom/org/eclipse/jdt/core/dom/ASTVisitor.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTVisitor.java,v >retrieving revision 1.20 >diff -u -r1.20 ASTVisitor.java >--- dom/org/eclipse/jdt/core/dom/ASTVisitor.java 23 Feb 2005 02:47:27 -0000 1.20 >+++ dom/org/eclipse/jdt/core/dom/ASTVisitor.java 15 Mar 2005 00:39:05 -0000 >@@ -173,7 +173,7 @@ > * @return <code>true</code> if the children of this node should be > * visited, and <code>false</code> if the children of this node should > * be skipped >- * @since 3.0 >+ * @since 3.1 > */ > public boolean visit(AnnotationTypeDeclaration node) { > return true; >@@ -191,7 +191,7 @@ > * @return <code>true</code> if the children of this node should be > * visited, and <code>false</code> if the children of this node should > * be skipped >- * @since 3.0 >+ * @since 3.1 > */ > public boolean visit(AnnotationTypeMemberDeclaration node) { > return true; >@@ -551,7 +551,7 @@ > * @return <code>true</code> if the children of this node should be > * visited, and <code>false</code> if the children of this node should > * be skipped >- * @since 3.0 >+ * @since 3.1 > */ > public boolean visit(EnhancedForStatement node) { > return true; >@@ -568,7 +568,7 @@ > * @return <code>true</code> if the children of this node should be > * visited, and <code>false</code> if the children of this node should > * be skipped >- * @since 3.0 >+ * @since 3.1 > */ > public boolean visit(EnumConstantDeclaration node) { > return true; >@@ -585,7 +585,7 @@ > * @return <code>true</code> if the children of this node should be > * visited, and <code>false</code> if the children of this node should > * be skipped >- * @since 3.0 >+ * @since 3.1 > */ > public boolean visit(EnumDeclaration node) { > return true; >@@ -808,7 +808,7 @@ > * @return <code>true</code> if the children of this node should be > * visited, and <code>false</code> if the children of this node should > * be skipped >- * @since 3.0 >+ * @since 3.1 > */ > public boolean visit(MarkerAnnotation node) { > return true; >@@ -844,7 +844,7 @@ > * @return <code>true</code> if the children of this node should be > * visited, and <code>false</code> if the children of this node should > * be skipped >- * @since 3.0 >+ * @since 3.1 > */ > public boolean visit(MemberValuePair node) { > return true; >@@ -931,7 +931,7 @@ > * @return <code>true</code> if the children of this node should be > * visited, and <code>false</code> if the children of this node should > * be skipped >- * @since 3.0 >+ * @since 3.1 > */ > public boolean visit(Modifier node) { > return true; >@@ -949,7 +949,7 @@ > * @return <code>true</code> if the children of this node should be > * visited, and <code>false</code> if the children of this node should > * be skipped >- * @since 3.0 >+ * @since 3.1 > */ > public boolean visit(NormalAnnotation node) { > return true; >@@ -1015,7 +1015,7 @@ > * @return <code>true</code> if the children of this node should be > * visited, and <code>false</code> if the children of this node should > * be skipped >- * @since 3.0 >+ * @since 3.1 > */ > public boolean visit(ParameterizedType node) { > return true; >@@ -1112,7 +1112,7 @@ > * @return <code>true</code> if the children of this node should be > * visited, and <code>false</code> if the children of this node should > * be skipped >- * @since 3.0 >+ * @since 3.1 > */ > public boolean visit(QualifiedType node) { > return true; >@@ -1178,7 +1178,7 @@ > * @return <code>true</code> if the children of this node should be > * visited, and <code>false</code> if the children of this node should > * be skipped >- * @since 3.0 >+ * @since 3.1 > */ > public boolean visit(SingleMemberAnnotation node) { > return true; >@@ -1457,7 +1457,7 @@ > * @return <code>true</code> if the children of this node should be > * visited, and <code>false</code> if the children of this node should > * be skipped >- * @since 3.0 >+ * @since 3.1 > */ > public boolean visit(TypeParameter node) { > return true; >@@ -1538,7 +1538,7 @@ > * @return <code>true</code> if the children of this node should be > * visited, and <code>false</code> if the children of this node should > * be skipped >- * @since 3.0 >+ * @since 3.1 > */ > public boolean visit(WildcardType node) { > return true; >@@ -1551,7 +1551,7 @@ > * </p> > * > * @param node the node to visit >- * @since 3.0 >+ * @since 3.1 > */ > public void endVisit(AnnotationTypeDeclaration node) { > // default implementation: do nothing >@@ -1564,7 +1564,7 @@ > * </p> > * > * @param node the node to visit >- * @since 3.0 >+ * @since 3.1 > */ > public void endVisit(AnnotationTypeMemberDeclaration node) { > // default implementation: do nothing >@@ -1835,7 +1835,7 @@ > * </p> > * > * @param node the node to visit >- * @since 3.0 >+ * @since 3.1 > */ > public void endVisit(EnhancedForStatement node) { > // default implementation: do nothing >@@ -1848,7 +1848,7 @@ > * </p> > * > * @param node the node to visit >- * @since 3.0 >+ * @since 3.1 > */ > public void endVisit(EnumConstantDeclaration node) { > // default implementation: do nothing >@@ -1861,7 +1861,7 @@ > * </p> > * > * @param node the node to visit >- * @since 3.0 >+ * @since 3.1 > */ > public void endVisit(EnumDeclaration node) { > // default implementation: do nothing >@@ -2024,7 +2024,7 @@ > * </p> > * > * @param node the node to visit >- * @since 3.0 >+ * @since 3.1 > */ > public void endVisit(MarkerAnnotation node) { > // default implementation: do nothing >@@ -2050,7 +2050,7 @@ > * </p> > * > * @param node the node to visit >- * @since 3.0 >+ * @since 3.1 > */ > public void endVisit(MemberValuePair node) { > // default implementation: do nothing >@@ -2113,7 +2113,7 @@ > * </p> > * > * @param node the node to visit >- * @since 3.0 >+ * @since 3.1 > */ > public void endVisit(Modifier node) { > // default implementation: do nothing >@@ -2126,7 +2126,7 @@ > * </p> > * > * @param node the node to visit >- * @since 3.0 >+ * @since 3.1 > */ > public void endVisit(NormalAnnotation node) { > // default implementation: do nothing >@@ -2175,7 +2175,7 @@ > * </p> > * > * @param node the node to visit >- * @since 3.0 >+ * @since 3.1 > */ > public void endVisit(ParameterizedType node) { > // default implementation: do nothing >@@ -2248,7 +2248,7 @@ > * </p> > * > * @param node the node to visit >- * @since 3.0 >+ * @since 3.1 > */ > public void endVisit(QualifiedType node) { > // default implementation: do nothing >@@ -2297,7 +2297,7 @@ > * </p> > * > * @param node the node to visit >- * @since 3.0 >+ * @since 3.1 > */ > public void endVisit(SingleMemberAnnotation node) { > // default implementation: do nothing >@@ -2504,7 +2504,7 @@ > * </p> > * > * @param node the node to visit >- * @since 3.0 >+ * @since 3.1 > */ > public void endVisit(TypeParameter node) { > // default implementation: do nothing >@@ -2565,7 +2565,7 @@ > * </p> > * > * @param node the node to visit >- * @since 3.0 >+ * @since 3.1 > */ > public void endVisit(WildcardType node) { > // default implementation: do nothing >Index: dom/org/eclipse/jdt/core/dom/Annotation.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Annotation.java,v >retrieving revision 1.10 >diff -u -r1.10 Annotation.java >--- dom/org/eclipse/jdt/core/dom/Annotation.java 23 Feb 2005 02:47:27 -0000 1.10 >+++ dom/org/eclipse/jdt/core/dom/Annotation.java 15 Mar 2005 00:39:05 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2004 IBM Corporation and others. >+ * Copyright (c) 2004, 2005 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -20,13 +20,7 @@ > * SingleMemberAnnotation > * </pre> > * </p> >- * <p> >- * Note: This API element is only needed for dealing with Java code that uses >- * new language features of J2SE 1.5. It is included in anticipation of J2SE >- * 1.5 support, which is planned for the next release of Eclipse after 3.0, and >- * may change slightly before reaching its final form. >- * </p> >- * @since 3.0 >+ * @since 3.1 > */ > public abstract class Annotation extends Expression implements IExtendedModifier { > >@@ -43,7 +37,6 @@ > * of this node. > * > * @return the property descriptor >- * @since 3.1 > */ > public final ChildPropertyDescriptor getTypeNameProperty() { > return internalTypeNameProperty(); >Index: dom/org/eclipse/jdt/core/dom/AnnotationTypeDeclaration.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AnnotationTypeDeclaration.java,v >retrieving revision 1.13 >diff -u -r1.13 AnnotationTypeDeclaration.java >--- dom/org/eclipse/jdt/core/dom/AnnotationTypeDeclaration.java 23 Feb 2005 02:47:27 -0000 1.13 >+++ dom/org/eclipse/jdt/core/dom/AnnotationTypeDeclaration.java 15 Mar 2005 00:39:05 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2004 IBM Corporation and others. >+ * Copyright (c) 2004, 2005 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -39,14 +39,8 @@ > * modifiers). The source range extends through the last character of the "}" > * token following the body declarations. > * </p> >- * <p> >- * Note: This API element is only needed for dealing with Java code that uses >- * new language features of J2SE 1.5. It is included in anticipation of J2SE >- * 1.5 support, which is planned for the next release of Eclipse after 3.0, and >- * may change slightly before reaching its final form. >- * </p> > * >- * @since 3.0 >+ * @since 3.1 > */ > public class AnnotationTypeDeclaration extends AbstractTypeDeclaration { > >Index: dom/org/eclipse/jdt/core/dom/AnnotationTypeMemberDeclaration.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AnnotationTypeMemberDeclaration.java,v >retrieving revision 1.17 >diff -u -r1.17 AnnotationTypeMemberDeclaration.java >--- dom/org/eclipse/jdt/core/dom/AnnotationTypeMemberDeclaration.java 23 Feb 2005 02:47:27 -0000 1.17 >+++ dom/org/eclipse/jdt/core/dom/AnnotationTypeMemberDeclaration.java 15 Mar 2005 00:39:05 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2004 IBM Corporation and others. >+ * Copyright (c) 2004, 2005 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -33,48 +33,37 @@ > * The source range extends through the last character of the > * ";" token. > * </p> >- * <p> >- * Note: This API element is only needed for dealing with Java code that uses >- * new language features of J2SE 1.5. It is included in anticipation of J2SE >- * 1.5 support, which is planned for the next release of Eclipse after 3.0, and >- * may change slightly before reaching its final form. >- * </p> > * >- * @since 3.0 >+ * @since 3.1 > */ > public class AnnotationTypeMemberDeclaration extends BodyDeclaration { > > /** > * The "javadoc" structural property of this node type. >- * @since 3.0 > */ > public static final ChildPropertyDescriptor JAVADOC_PROPERTY = > internalJavadocPropertyFactory(AnnotationTypeMemberDeclaration.class); > > /** > * The "modifiers" structural property of this node type. >- * @since 3.0 > */ > public static final ChildListPropertyDescriptor MODIFIERS2_PROPERTY = > internalModifiers2PropertyFactory(AnnotationTypeMemberDeclaration.class); > > /** > * The "name" structural property of this node type. >- * @since 3.0 > */ > public static final ChildPropertyDescriptor NAME_PROPERTY = > new ChildPropertyDescriptor(AnnotationTypeMemberDeclaration.class, "name", SimpleName.class, MANDATORY, NO_CYCLE_RISK); //$NON-NLS-1$ > > /** > * The "type" structural property of this node type. >- * @since 3.0 > */ > public static final ChildPropertyDescriptor TYPE_PROPERTY = > new ChildPropertyDescriptor(AnnotationTypeMemberDeclaration.class, "type", Type.class, MANDATORY, NO_CYCLE_RISK); //$NON-NLS-1$ > > /** > * The "default" structural property of this node type. >- * @since 3.0 > */ > public static final ChildPropertyDescriptor DEFAULT_PROPERTY = > new ChildPropertyDescriptor(AnnotationTypeMemberDeclaration.class, "default", Expression.class, OPTIONAL, CYCLE_RISK); //$NON-NLS-1$ >Index: dom/org/eclipse/jdt/core/dom/BodyDeclaration.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BodyDeclaration.java,v >retrieving revision 1.21 >diff -u -r1.21 BodyDeclaration.java >--- dom/org/eclipse/jdt/core/dom/BodyDeclaration.java 23 Feb 2005 02:47:27 -0000 1.21 >+++ dom/org/eclipse/jdt/core/dom/BodyDeclaration.java 15 Mar 2005 00:39:05 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2004 IBM Corporation and others. >+ * Copyright (c) 2000, 2005 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -231,16 +231,26 @@ > * @exception UnsupportedOperationException if this operation is used in > * an AST later than JLS2 > * @see Modifier >+ * @deprecated In the JLS3 API, this method is replaced by >+ * {@link #modifiers()} which contains a list of a <code>Modifier</code> nodes. > */ >- // TODO (jeem) When JLS3 support is complete (post 3.0) - deprecated In the JLS3 API, this method is replaced by <code>modifiers()</code> which contains a list of a <code>Modifier</code> nodes. > public void setModifiers(int modifiers) { >+ internalSetModifiers(modifiers); >+ } >+ >+ /** >+ * Internal synonym for deprecated method. Used to avoid >+ * deprecation warnings. >+ * @since 3.1 >+ */ >+ /*package*/ final void internalSetModifiers(int pmodifiers) { > // more efficient than just calling supportedOnlyIn2() to check > if (this.modifiers != null) { > supportedOnlyIn2(); > } > SimplePropertyDescriptor p = internalModifiersProperty(); > preValueChange(p); >- this.modifierFlags = modifiers; >+ this.modifierFlags = pmodifiers; > postValueChange(p); > } > >@@ -252,7 +262,7 @@ > * (element type: <code>IExtendedModifier</code>) > * @exception UnsupportedOperationException if this operation is used in > * a JLS2 AST >- * @since 3.0 >+ * @since 3.1 > */ > public List modifiers() { > // more efficient than just calling unsupportedIn2() to check >Index: dom/org/eclipse/jdt/core/dom/ClassInstanceCreation.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ClassInstanceCreation.java,v >retrieving revision 1.38 >diff -u -r1.38 ClassInstanceCreation.java >--- dom/org/eclipse/jdt/core/dom/ClassInstanceCreation.java 23 Feb 2005 02:47:27 -0000 1.38 >+++ dom/org/eclipse/jdt/core/dom/ClassInstanceCreation.java 15 Mar 2005 00:39:05 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2004 IBM Corporation and others. >+ * Copyright (c) 2000, 2005 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -63,7 +63,7 @@ > > /** > * The "typeArguments" structural property of this node type (added in JLS3 API). >- * @since 3.0 >+ * @since 3.1 > */ > public static final ChildListPropertyDescriptor TYPE_ARGUMENTS_PROPERTY = > new ChildListPropertyDescriptor(ClassInstanceCreation.class, "typeArguments", Type.class, NO_CYCLE_RISK); //$NON-NLS-1$ >@@ -79,13 +79,12 @@ > * The "name" structural property of this node type (JLS2 API only). > * @since 3.0 > */ >- // TODO (jeem) When JLS3 support is complete (post 3.0) - deprecated Replaced by {@link #TYPE_PROPERTY} in the JLS3 API. > public static final ChildPropertyDescriptor NAME_PROPERTY = > new ChildPropertyDescriptor(ClassInstanceCreation.class, "name", Name.class, MANDATORY, NO_CYCLE_RISK); //$NON-NLS-1$ > > /** > * The "type" structural property of this node type (added in JLS3 API). >- * @since 3.0 >+ * @since 3.1 > */ > public static final ChildPropertyDescriptor TYPE_PROPERTY = > new ChildPropertyDescriptor(ClassInstanceCreation.class, "type", Type.class, MANDATORY, NO_CYCLE_RISK); //$NON-NLS-1$ >@@ -116,7 +115,7 @@ > * A list of property descriptors (element type: > * {@link StructuralPropertyDescriptor}), > * or null if uninitialized. >- * @since 3.0 >+ * @since 3.1 > */ > private static final List PROPERTY_DESCRIPTORS_3_0; > >@@ -151,7 +150,7 @@ > * @since 3.0 > */ > public static List propertyDescriptors(int apiLevel) { >- if (apiLevel == AST.JLS2) { >+ if (apiLevel == AST.JLS2_INTERNAL) { > return PROPERTY_DESCRIPTORS_2_0; > } else { > return PROPERTY_DESCRIPTORS_3_0; >@@ -167,7 +166,7 @@ > * The type arguments (element type: <code>Type</code>). > * Null in JLS2. Added in JLS3; defaults to an empty list > * (see constructor). >- * @since 3.0 >+ * @since 3.1 > */ > private ASTNode.NodeList typeArguments = null; > >@@ -294,7 +293,7 @@ > result.setSourceRange(this.getStartPosition(), this.getLength()); > result.setExpression( > (Expression) ASTNode.copySubtree(target, getExpression())); >- if (this.ast.apiLevel == AST.JLS2) { >+ if (this.ast.apiLevel == AST.JLS2_INTERNAL) { > result.setName((Name) getName().clone(target)); > } > if (this.ast.apiLevel >= AST.JLS3) { >@@ -324,7 +323,7 @@ > if (visitChildren) { > // visit children in normal left to right reading order > acceptChild(visitor, getExpression()); >- if (this.ast.apiLevel == AST.JLS2) { >+ if (this.ast.apiLevel == AST.JLS2_INTERNAL) { > acceptChild(visitor, getName()); > } > if (this.ast.apiLevel >= AST.JLS3) { >@@ -371,18 +370,12 @@ > /** > * Returns the live ordered list of type arguments of this class > * instance creation (added in JLS3 API). >- * <p> >- * Note: This API element is only needed for dealing with Java code that uses >- * new language features of J2SE 1.5. It is included in anticipation of J2SE >- * 1.5 support, which is planned for the next release of Eclipse after 3.0, and >- * may change slightly before reaching its final form. >- * </p> > * > * @return the live list of type arguments > * (element type: <code>Type</code>) > * @exception UnsupportedOperationException if this operation is used in > * a JLS2 AST >- * @since 3.0 >+ * @since 3.1 > */ > public List typeArguments() { > // more efficient than just calling unsupportedIn2() to check >@@ -399,9 +392,20 @@ > * @return the type name node > * @exception UnsupportedOperationException if this operation is used in > * an AST later than JLS2 >+ * @deprecated In the JLS3 API, this method is replaced by >+ * {@link #getType()}, which returns a <code>Type</code> instead of a >+ * <code>Name</code>. > */ >- // TODO (jeem) When JLS3 support is complete (post 3.0) - deprecated In the JLS3 API, this method is replaced by <code>getType</code>, which returns a <code>Type</code> instead of a <code>Name</code>. > public Name getName() { >+ return internalGetName(); >+ } >+ >+ /** >+ * Internal synonym for deprecated method. Used to avoid >+ * deprecation warnings. >+ * @since 3.1 >+ */ >+ /*package*/ Name internalGetName() { > supportedOnlyIn2(); > if (this.typeName == null) { > // lazy init must be thread-safe for readers >@@ -428,9 +432,20 @@ > * </ul> > * @exception UnsupportedOperationException if this operation is used in > * an AST later than JLS2 >+ * @deprecated In the JLS3 API, this method is replaced by >+ * {@link #setType(Type)}, which expects a <code>Type</code> instead of >+ * a <code>Name</code>. > */ >- // TODO (jeem) When JLS3 support is complete (post 3.0) - deprecated In the JLS3 API, this method is replaced by <code>setType</code>, which expects a <code>Type</code> instead of a <code>Name</code>. > public void setName(Name name) { >+ internalSetName(name); >+ } >+ >+ /** >+ * Internal synonym for deprecated method. Used to avoid >+ * deprecation warnings. >+ * @since 3.1 >+ */ >+ /*package*/ public void internalSetName(Name name) { > supportedOnlyIn2(); > if (name == null) { > throw new IllegalArgumentException(); >@@ -448,7 +463,7 @@ > * @return the type node > * @exception UnsupportedOperationException if this operation is used in > * a JLS2 AST >- * @since 3.0 >+ * @since 3.1 > */ > public Type getType() { > unsupportedIn2(); >@@ -477,7 +492,7 @@ > * </ul> > * @exception UnsupportedOperationException if this operation is used in > * a JLS2 AST >- * @since 3.0 >+ * @since 3.1 > */ > public void setType(Type type) { > unsupportedIn2(); >Index: dom/org/eclipse/jdt/core/dom/CompilationUnit.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnit.java,v >retrieving revision 1.64 >diff -u -r1.64 CompilationUnit.java >--- dom/org/eclipse/jdt/core/dom/CompilationUnit.java 7 Mar 2005 17:51:04 -0000 1.64 >+++ dom/org/eclipse/jdt/core/dom/CompilationUnit.java 15 Mar 2005 00:39:06 -0000 >@@ -348,7 +348,7 @@ > * compilation unit, in order of appearance. > * <p> > * Note that in JLS3, the types may include both enum declarations >- * and annotation type declarations introduced in J2SE 1.5. >+ * and annotation type declarations introduced in J2SE 5. > * For JLS2, the elements are always <code>TypeDeclaration</code>. > * </p> > * >Index: dom/org/eclipse/jdt/core/dom/ConstructorInvocation.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ConstructorInvocation.java,v >retrieving revision 1.22 >diff -u -r1.22 ConstructorInvocation.java >--- dom/org/eclipse/jdt/core/dom/ConstructorInvocation.java 23 Feb 2005 02:47:27 -0000 1.22 >+++ dom/org/eclipse/jdt/core/dom/ConstructorInvocation.java 15 Mar 2005 00:39:06 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2004 IBM Corporation and others. >+ * Copyright (c) 2000, 2005 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -34,7 +34,7 @@ > > /** > * The "typeArguments" structural property of this node type (added in JLS3 API). >- * @since 3.0 >+ * @since 3.1 > */ > public static final ChildListPropertyDescriptor TYPE_ARGUMENTS_PROPERTY = > new ChildListPropertyDescriptor(ConstructorInvocation.class, "typeArguments", Type.class, NO_CYCLE_RISK); //$NON-NLS-1$ >@@ -58,7 +58,7 @@ > * A list of property descriptors (element type: > * {@link StructuralPropertyDescriptor}), > * or null if uninitialized. >- * @since 3.0 >+ * @since 3.1 > */ > private static final List PROPERTY_DESCRIPTORS_3_0; > >@@ -87,7 +87,7 @@ > * @since 3.0 > */ > public static List propertyDescriptors(int apiLevel) { >- if (apiLevel == AST.JLS2) { >+ if (apiLevel == AST.JLS2_INTERNAL) { > return PROPERTY_DESCRIPTORS_2_0; > } else { > return PROPERTY_DESCRIPTORS_3_0; >@@ -98,7 +98,7 @@ > * The type arguments (element type: <code>Type</code>). > * Null in JLS2. Added in JLS3; defaults to an empty list > * (see constructor). >- * @since 3.0 >+ * @since 3.1 > */ > private ASTNode.NodeList typeArguments = null; > >@@ -189,18 +189,12 @@ > /** > * Returns the live ordered list of type arguments of this constructor > * invocation (added in JLS3 API). >- * <p> >- * Note: This API element is only needed for dealing with Java code that uses >- * new language features of J2SE 1.5. It is included in anticipation of J2SE >- * 1.5 support, which is planned for the next release of Eclipse after 3.0, and >- * may change slightly before reaching its final form. >- * </p> > * > * @return the live list of type arguments > * (element type: <code>Type</code>) > * @exception UnsupportedOperationException if this operation is used in > * a JLS2 AST >- * @since 3.0 >+ * @since 3.1 > */ > public List typeArguments() { > // more efficient than just calling unsupportedIn2() to check >Index: dom/org/eclipse/jdt/core/dom/DocCommentParser.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DocCommentParser.java,v >retrieving revision 1.21 >diff -u -r1.21 DocCommentParser.java >--- dom/org/eclipse/jdt/core/dom/DocCommentParser.java 14 Mar 2005 18:20:43 -0000 1.21 >+++ dom/org/eclipse/jdt/core/dom/DocCommentParser.java 15 Mar 2005 00:39:06 -0000 >@@ -62,7 +62,7 @@ > commentParse(start, start+length-1); > } > this.docComment.setSourceRange(start, length); >- if (this.ast.apiLevel == AST.JLS2) { >+ if (this.ast.apiLevel == AST.JLS2_INTERNAL) { > setComment(start, length); // backward compatibility > } > return this.docComment; >Index: dom/org/eclipse/jdt/core/dom/EnhancedForStatement.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/EnhancedForStatement.java,v >retrieving revision 1.17 >diff -u -r1.17 EnhancedForStatement.java >--- dom/org/eclipse/jdt/core/dom/EnhancedForStatement.java 23 Feb 2005 02:47:27 -0000 1.17 >+++ dom/org/eclipse/jdt/core/dom/EnhancedForStatement.java 15 Mar 2005 00:39:06 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2004 IBM Corporation and others. >+ * Copyright (c) 2000, 2005 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -24,33 +24,25 @@ > * </pre> > * The FormalParameter is represented by a <code>SingleVariableDeclaration</code> > * (without an initializer). >- * <p> >- * Note: This API element is only needed for dealing with Java code that uses >- * new language features of J2SE 1.5. It is included in anticipation of J2SE >- * 1.5 support, which is planned for the next release of Eclipse after 3.0, and >- * may change slightly before reaching its final form. >- * </p> >- * @since 3.0 >+ * >+ * @since 3.1 > */ > public class EnhancedForStatement extends Statement { > > /** > * The "parameter" structural property of this node type. >- * @since 3.0 > */ > public static final ChildPropertyDescriptor PARAMETER_PROPERTY = > new ChildPropertyDescriptor(EnhancedForStatement.class, "parameter", SingleVariableDeclaration.class, MANDATORY, CYCLE_RISK); //$NON-NLS-1$ > > /** > * The "expression" structural property of this node type. >- * @since 3.0 > */ > public static final ChildPropertyDescriptor EXPRESSION_PROPERTY = > new ChildPropertyDescriptor(EnhancedForStatement.class, "expression", Expression.class, MANDATORY, CYCLE_RISK); //$NON-NLS-1$ > > /** > * The "body" structural property of this node type. >- * @since 3.0 > */ > public static final ChildPropertyDescriptor BODY_PROPERTY = > new ChildPropertyDescriptor(EnhancedForStatement.class, "body", Statement.class, MANDATORY, CYCLE_RISK); //$NON-NLS-1$ >@@ -80,7 +72,6 @@ > > * @return a list of property descriptors (element type: > * {@link StructuralPropertyDescriptor}) >- * @since 3.0 > */ > public static List propertyDescriptors(int apiLevel) { > return PROPERTY_DESCRIPTORS; >Index: dom/org/eclipse/jdt/core/dom/EnumConstantDeclaration.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/EnumConstantDeclaration.java,v >retrieving revision 1.20 >diff -u -r1.20 EnumConstantDeclaration.java >--- dom/org/eclipse/jdt/core/dom/EnumConstantDeclaration.java 8 Mar 2005 18:57:40 -0000 1.20 >+++ dom/org/eclipse/jdt/core/dom/EnumConstantDeclaration.java 15 Mar 2005 00:39:06 -0000 >@@ -35,14 +35,8 @@ > * arguments and no class body declarations, the source range extends through > * the last character of the identifier. > * </p> >- * <p> >- * Note: This API element is only needed for dealing with Java code that uses >- * new language features of J2SE 1.5. It is included in anticipation of J2SE >- * 1.5 support, which is planned for the next release of Eclipse after 3.0, and >- * may change slightly before reaching its final form. >- * </p> > * >- * @since 3.0 >+ * @since 3.1 > */ > public class EnumConstantDeclaration extends BodyDeclaration { > >@@ -80,7 +74,6 @@ > > /** > * The "anonymousClassDeclaration" structural property of this node type. >- * @since 3.1 > */ > public static final ChildPropertyDescriptor ANONYMOUS_CLASS_DECLARATION_PROPERTY = > new ChildPropertyDescriptor(EnumConstantDeclaration.class, "anonymousClassDeclaration", AnonymousClassDeclaration.class, OPTIONAL, CYCLE_RISK); //$NON-NLS-1$ >@@ -143,7 +136,6 @@ > /** > * The optional anonymous class declaration; <code>null</code> for none; > * defaults to none. >- * @since 3.1 > */ > private AnonymousClassDeclaration optionalAnonymousClassDeclaration = null; > >@@ -373,7 +365,6 @@ > * enum constant declaration, if it has one. > * > * @return the anonymous class declaration, or <code>null</code> if none >- * @since 3.1 > */ > public AnonymousClassDeclaration getAnonymousClassDeclaration() { > return this.optionalAnonymousClassDeclaration; >@@ -385,7 +376,6 @@ > * > * @param decl the anonymous class declaration, or <code>null</code> > * if none >- * @since 3.1 > */ > public void setAnonymousClassDeclaration(AnonymousClassDeclaration decl) { > ASTNode oldChild = this.optionalAnonymousClassDeclaration; >@@ -404,7 +394,6 @@ > * > * @return the constructor binding, or <code>null</code> if the binding > * cannot be resolved >- * @since 3.1 > */ > public IMethodBinding resolveConstructorBinding() { > return this.ast.getBindingResolver().resolveConstructor(this); >Index: dom/org/eclipse/jdt/core/dom/EnumDeclaration.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/EnumDeclaration.java,v >retrieving revision 1.18 >diff -u -r1.18 EnumDeclaration.java >--- dom/org/eclipse/jdt/core/dom/EnumDeclaration.java 23 Feb 2005 02:47:27 -0000 1.18 >+++ dom/org/eclipse/jdt/core/dom/EnumDeclaration.java 15 Mar 2005 00:39:06 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2004 IBM Corporation and others. >+ * Copyright (c) 2000, 2005 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -38,14 +38,8 @@ > * modifiers or annotations). The source range extends through the last > * character of the "}" token following the body declarations. > * </p> >- * <p> >- * Note: This API element is only needed for dealing with Java code that uses >- * new language features of J2SE 1.5. It is included in anticipation of J2SE >- * 1.5 support, which is planned for the next release of Eclipse after 3.0, and >- * may change slightly before reaching its final form. >- * </p> > * >- * @since 3.0 >+ * @since 3.1 > */ > public class EnumDeclaration extends AbstractTypeDeclaration { > >@@ -75,7 +69,6 @@ > > /** > * The "enumConstants" structural property of this node type. >- * @since 3.1 > */ > public static final ChildListPropertyDescriptor ENUM_CONSTANTS_PROPERTY = > new ChildListPropertyDescriptor(EnumDeclaration.class, "enumConstants", EnumConstantDeclaration.class, CYCLE_RISK); //$NON-NLS-1$ >@@ -130,7 +123,6 @@ > * The enum constant declarations > * (element type: <code>EnumConstantDeclaration</code>). > * Defaults to an empty list. >- * @since 3.1 > */ > private ASTNode.NodeList enumConstants = > new ASTNode.NodeList(ENUM_CONSTANTS_PROPERTY); >@@ -308,7 +300,6 @@ > * > * @return the live list of enum constant declarations > * (element type: {@link EnumConstantDeclaration}) >- * @since 3.1 > */ > public List enumConstants() { > return enumConstants; >Index: dom/org/eclipse/jdt/core/dom/FieldDeclaration.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/FieldDeclaration.java,v >retrieving revision 1.36 >diff -u -r1.36 FieldDeclaration.java >--- dom/org/eclipse/jdt/core/dom/FieldDeclaration.java 23 Feb 2005 02:47:27 -0000 1.36 >+++ dom/org/eclipse/jdt/core/dom/FieldDeclaration.java 15 Mar 2005 00:39:06 -0000 >@@ -48,13 +48,12 @@ > * The "modifiers" structural property of this node type (JLS2 API only). > * @since 3.0 > */ >- // TODO (jeem) When JLS3 support is complete (post 3.0) - deprecated Replaced by {@link #MODIFIERS2_PROPERTY} in the JLS3 API. > public static final SimplePropertyDescriptor MODIFIERS_PROPERTY = > internalModifiersPropertyFactory(FieldDeclaration.class); > > /** > * The "modifiers" structural property of this node type (added in JLS3 API). >- * @since 3.0 >+ * @since 3.1 > */ > public static final ChildListPropertyDescriptor MODIFIERS2_PROPERTY = > internalModifiers2PropertyFactory(FieldDeclaration.class); >@@ -85,7 +84,7 @@ > * A list of property descriptors (element type: > * {@link StructuralPropertyDescriptor}), > * or null if uninitialized. >- * @since 3.0 >+ * @since 3.1 > */ > private static final List PROPERTY_DESCRIPTORS_3_0; > >@@ -119,7 +118,7 @@ > * @since 3.0 > */ > public static List propertyDescriptors(int apiLevel) { >- if (apiLevel == AST.JLS2) { >+ if (apiLevel == AST.JLS2_INTERNAL) { > return PROPERTY_DESCRIPTORS_2_0; > } else { > return PROPERTY_DESCRIPTORS_3_0; >@@ -170,7 +169,7 @@ > if (get) { > return getModifiers(); > } else { >- setModifiers(value); >+ internalSetModifiers(value); > return 0; > } > } >@@ -252,8 +251,8 @@ > result.setSourceRange(this.getStartPosition(), this.getLength()); > result.setJavadoc( > (Javadoc) ASTNode.copySubtree(target, getJavadoc())); >- if (this.ast.apiLevel == AST.JLS2) { >- result.setModifiers(getModifiers()); >+ if (this.ast.apiLevel == AST.JLS2_INTERNAL) { >+ result.internalSetModifiers(getModifiers()); > } > if (this.ast.apiLevel >= AST.JLS3) { > result.modifiers().addAll(ASTNode.copySubtrees(target, modifiers())); >Index: dom/org/eclipse/jdt/core/dom/IBinding.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IBinding.java,v >retrieving revision 1.20 >diff -u -r1.20 IBinding.java >--- dom/org/eclipse/jdt/core/dom/IBinding.java 23 Feb 2005 02:47:27 -0000 1.20 >+++ dom/org/eclipse/jdt/core/dom/IBinding.java 15 Mar 2005 00:39:06 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2004 IBM Corporation and others. >+ * Copyright (c) 2000, 2005 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >Index: dom/org/eclipse/jdt/core/dom/IExtendedModifier.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IExtendedModifier.java,v >retrieving revision 1.3 >diff -u -r1.3 IExtendedModifier.java >--- dom/org/eclipse/jdt/core/dom/IExtendedModifier.java 23 Feb 2005 02:47:27 -0000 1.3 >+++ dom/org/eclipse/jdt/core/dom/IExtendedModifier.java 15 Mar 2005 00:39:06 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2004 IBM Corporation and others. >+ * Copyright (c) 2004, 2005 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -18,7 +18,7 @@ > * Modifier > * Annotation > * </pre> >- * @since 3.0 >+ * @since 3.1 > */ > public interface IExtendedModifier { > >Index: dom/org/eclipse/jdt/core/dom/IMethodBinding.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IMethodBinding.java,v >retrieving revision 1.21 >diff -u -r1.21 IMethodBinding.java >--- dom/org/eclipse/jdt/core/dom/IMethodBinding.java 25 Feb 2005 15:12:58 -0000 1.21 >+++ dom/org/eclipse/jdt/core/dom/IMethodBinding.java 15 Mar 2005 00:39:06 -0000 >@@ -138,15 +138,11 @@ > * parameters (they instead have non-empty type arguments > * and non-trivial erasure). > * </p> >- * <p> >- * Note: Support for new language features proposed for the upcoming 1.5 >- * release of J2SE is tentative and subject to change. >- * </p> > * > * @return the list of binding for the type variables for the type > * parameters of this method, or otherwise the empty list > * @see ITypeBinding#isTypeVariable() >- * @since 3.0 >+ * @since 3.1 > */ > public ITypeBinding[] getTypeParameters(); > >@@ -166,10 +162,6 @@ > * {@link #isParameterizedMethod()}, > * and {@link #isRawMethod()} are mutually exclusive. > * </p> >- * <p> >- * Note: Support for new language features of the 1.5 >- * release of J2SE is tentative and subject to change. >- * </p> > * > * @return <code>true</code> if this method binding represents a > * declaration of a generic method, and <code>false</code> otherwise >@@ -186,10 +178,6 @@ > * {@link #isParameterizedMethod()}, > * and {@link #isRawMethod()} are mutually exclusive. > * </p> >- * <p> >- * Note: Support for new language features proposed for the upcoming 1.5 >- * release of J2SE is tentative and subject to change. >- * </p> > * > * @return <code>true</code> if this method binding represents a > * an instance of a generic method corresponding to a parameterized >@@ -210,10 +198,6 @@ > * which only occur on the method binding corresponding directly to the > * declaration of a generic method. > * </p> >- * <p> >- * Note: Support for new language features proposed for the upcoming 1.5 >- * release of J2SE is tentative and subject to change. >- * </p> > * > * @return the list of type bindings for the type arguments used to > * instantiate the corrresponding generic method, or otherwise the empty list >@@ -237,10 +221,6 @@ > * and raw methods ({@link #isRawMethod()}), this method returns the binding > * for the corresponding generic method. For other method bindings, this > * returns the same binding. >- * <p> >- * Note: Support for new language features proposed for the upcoming 1.5 >- * release of J2SE is tentative and subject to change. >- * </p> > * > * @return the method binding > * @since 3.1 >@@ -261,10 +241,6 @@ > * Note that {@link #isGenericMethod()}, > * {@link #isParameterizedMethod()}, > * and {@link #isRawMethod()} are mutually exclusive. >- * </p> >- * <p> >- * Note: Support for new language features proposed for the upcoming 1.5 >- * release of J2SE is tentative and subject to change. > * </p> > * > * @return <code>true</code> if this method binding represents a >Index: dom/org/eclipse/jdt/core/dom/ITypeBinding.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ITypeBinding.java,v >retrieving revision 1.39 >diff -u -r1.39 ITypeBinding.java >--- dom/org/eclipse/jdt/core/dom/ITypeBinding.java 24 Feb 2005 23:28:17 -0000 1.39 >+++ dom/org/eclipse/jdt/core/dom/ITypeBinding.java 15 Mar 2005 00:39:06 -0000 >@@ -40,10 +40,6 @@ > * <p> > * This interface is not intended to be implemented by clients. > * </p> >- * <p> >- * Note: Support for new language features proposed for the upcoming 1.5 >- * release of J2SE is tentative and subject to change. >- * </p> > * > * @see ITypeBinding#getDeclaredTypes() > * @since 2.0 >@@ -165,14 +161,10 @@ > > /** > * Returns whether this type binding represents an enum type. >- * <p> >- * Note: Support for new language features proposed for the upcoming 1.5 >- * release of J2SE is tentative and subject to change. >- * </p> > * > * @return <code>true</code> if this object represents an enum type, > * and <code>false</code> otherwise >- * @since 3.0 >+ * @since 3.1 > */ > public boolean isEnum(); > >@@ -181,14 +173,10 @@ > * <p> > * Note that an annotation type is always an interface. > * </p> >- * <p> >- * Note: Support for new language features proposed for the upcoming 1.5 >- * release of J2SE is tentative and subject to change. >- * </p> > * > * @return <code>true</code> if this object represents an annotation type, > * and <code>false</code> otherwise >- * @since 3.0 >+ * @since 3.1 > */ > public boolean isAnnotation(); > >@@ -201,15 +189,11 @@ > * type do not carry type parameters (they instead have non-empty type arguments > * and non-trivial erasure). > * </p> >- * <p> >- * Note: Support for new language features proposed for the upcoming 1.5 >- * release of J2SE is tentative and subject to change. >- * </p> > * > * @return the list of binding for the type variables for the type > * parameters of this type, or otherwise the empty list > * @see #isTypeVariable() >- * @since 3.0 >+ * @since 3.1 > */ > // TODO (jeem) - clarify whether binding for a generic type instance carries a copy of the generic type's type parameters as well as type arguments > public ITypeBinding[] getTypeParameters(); >@@ -230,10 +214,6 @@ > * {@link #isParameterizedType()}, > * and {@link #isRawType()} are mutually exclusive. > * </p> >- * <p> >- * Note: Support for new language features of the 1.5 >- * release of J2SE is tentative and subject to change. >- * </p> > * > * @return <code>true</code> if this type binding represents a > * declaration of a generic class or interface, and <code>false</code> otherwise >@@ -245,30 +225,22 @@ > /** > * Returns whether this type binding represents a type variable. > * Type variables bindings carry the type variable's bounds. >- * <p> >- * Note: Support for new language features proposed for the upcoming 1.5 >- * release of J2SE is tentative and subject to change. >- * </p> > * > * @return <code>true</code> if this type binding is for a type variable, > * and <code>false</code> otherwise > * @see #getName() > * @see #getTypeBounds() >- * @since 3.0 >+ * @since 3.1 > */ > public boolean isTypeVariable(); > > /** > * Returns the type bounds of this type variable. >- * <p> >- * Note: Support for new language features proposed for the upcoming 1.5 >- * release of J2SE is tentative and subject to change. >- * </p> > * > * @return the list of type bindings for this type variable, or otherwise > * the empty list > * @see #isTypeVariable() >- * @since 3.0 >+ * @since 3.1 > */ > public ITypeBinding[] getTypeBounds(); > >@@ -292,7 +264,7 @@ > * type reference, and <code>false</code> otherwise > * @see #getTypeArguments() > * @see #getGenericType() >- * @since 3.0 >+ * @since 3.1 > */ > public boolean isParameterizedType(); > >@@ -308,10 +280,6 @@ > * type binding corresponding directly to the declaration of the > * generic class or interface (e.g., <code>Collection<T></code>). > * </p> >- * <p> >- * Note: Support for new language features proposed for the upcoming 1.5 >- * release of J2SE is tentative and subject to change. >- * </p> > * > * @return the list of type bindings for the type arguments used to > * instantiate the corrresponding generic type, or otherwise the empty list >@@ -319,7 +287,7 @@ > * @see #isGenericType() > * @see #isParameterizedType() > * @see #isRawType() >- * @since 3.0 >+ * @since 3.1 > */ > public ITypeBinding[] getTypeArguments(); > >@@ -339,13 +307,9 @@ > * if it has bounds and java.lang.Object if it does not.</li> > * <li>For all other type bindings - returns the identical binding.</li> > * </ul> >- * <p> >- * Note: Support for new language features proposed for the upcoming 1.5 >- * release of J2SE is tentative and subject to change. >- * </p> > * > * @return the erasure type binding >- * @since 3.0 >+ * @since 3.1 > */ > public ITypeBinding getErasure(); > >@@ -362,10 +326,6 @@ > * and raw types ({@link #isRawType()}), this method returns the binding > * for the corresponding generic type. For other type bindings, this > * returns the same binding. >- * <p> >- * Note: Support for new language features proposed for the upcoming 1.5 >- * release of J2SE is tentative and subject to change. >- * </p> > * > * @return the type binding > * @since 3.1 >@@ -390,17 +350,13 @@ > * {@link #isParameterizedType()}, > * and {@link #isRawType()} are mutually exclusive. > * </p> >- * <p> >- * Note: Support for new language features proposed for the upcoming 1.5 >- * release of J2SE is tentative and subject to change. >- * </p> > * > * @return <code>true</code> if this type binding represents a > * an instance of a generic type corresponding to a raw > * type reference, and <code>false</code> otherwise > * @see #getGenericType() > * @see #getTypeArguments() >- * @since 3.0 >+ * @since 3.1 > */ > public boolean isRawType(); > >@@ -413,14 +369,10 @@ > * parameterized type binding whose type argument is a wildcard type > * with upper type bound <code>java.util.Object/code>. > * </p> >- * <p> >- * Note: Support for new language features proposed for the upcoming 1.5 >- * release of J2SE is tentative and subject to change. >- * </p> > * > * @return <code>true</code> if this object represents a wildcard type, > * and <code>false</code> otherwise >- * @since 3.0 >+ * @since 3.1 > * @see #getBound() > * @see #isUpperbound() > */ >@@ -429,15 +381,11 @@ > /** > * Returns the bound of this wildcard type if it has one. > * Returns <code>null</code> if this is not a wildcard type. >- * <p> >- * Note: Support for new language features proposed for the upcoming 1.5 >- * release of J2SE is tentative and subject to change. >- * </p> > * > * @return the bound of this wildcard type, or <code>null</code> if none > * @see #isWildcardType() > * @see #isUpperbound() >- * @since 3.0 >+ * @since 3.1 > */ > public ITypeBinding getBound(); > >@@ -446,16 +394,12 @@ > * ("extends") as opposed to a lower bound ("super"). > * Note that this property is only relevant for wildcards > * that have a bound. >- * <p> >- * Note: Support for new language features proposed for the upcoming 1.5 >- * release of J2SE is tentative and subject to change. >- * </p> > * > * @return <code>true</code> if this wildcard type has a bound that is > * an upper bound, and <code>false</code> in all other cases > * @see #isWildcardType() > * @see #getBound() >- * @since 3.0 >+ * @since 3.1 > */ > public boolean isUpperbound(); > >Index: dom/org/eclipse/jdt/core/dom/ImportDeclaration.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ImportDeclaration.java,v >retrieving revision 1.27 >diff -u -r1.27 ImportDeclaration.java >--- dom/org/eclipse/jdt/core/dom/ImportDeclaration.java 23 Feb 2005 02:47:27 -0000 1.27 >+++ dom/org/eclipse/jdt/core/dom/ImportDeclaration.java 15 Mar 2005 00:39:06 -0000 >@@ -47,7 +47,7 @@ > > /** > * The "static" structural property of this node type (added in JLS3 API). >- * @since 3.0 >+ * @since 3.1 > */ > public static final SimplePropertyDescriptor STATIC_PROPERTY = > new SimplePropertyDescriptor(ImportDeclaration.class, "static", boolean.class, MANDATORY); //$NON-NLS-1$ >@@ -64,7 +64,7 @@ > * A list of property descriptors (element type: > * {@link StructuralPropertyDescriptor}), > * or null if uninitialized. >- * @since 3.0 >+ * @since 3.1 > */ > private static final List PROPERTY_DESCRIPTORS_3_0; > >@@ -95,7 +95,7 @@ > * @since 3.0 > */ > public static List propertyDescriptors(int apiLevel) { >- if (apiLevel == AST.JLS2) { >+ if (apiLevel == AST.JLS2_INTERNAL) { > return PROPERTY_DESCRIPTORS_2_0; > } else { > return PROPERTY_DESCRIPTORS_3_0; >@@ -116,7 +116,7 @@ > /** > * Static versus regular; defaults to regular import. > * Added in JLS3; not used in JLS2. >- * @since 3.0 >+ * @since 3.1 > */ > private boolean isStatic = false; > >@@ -303,18 +303,12 @@ > > /** > * Returns whether this import declaration is a static import (added in JLS3 API). >- * <p> >- * Note: This API element is only needed for dealing with Java code that uses >- * new language features of J2SE 1.5. It is included in anticipation of J2SE >- * 1.5 support, which is planned for the next release of Eclipse after 3.0, and >- * may change slightly before reaching its final form. >- * </p> > * > * @return <code>true</code> if this is a static import, > * and <code>false</code> if this is a regular import > * @exception UnsupportedOperationException if this operation is used in > * a JLS2 AST >- * @since 3.0 >+ * @since 3.1 > */ > public boolean isStatic() { > unsupportedIn2(); >@@ -323,18 +317,12 @@ > > /** > * Sets whether this import declaration is a static import (added in JLS3 API). >- * <p> >- * Note: This API element is only needed for dealing with Java code that uses >- * new language features of J2SE 1.5. It is included in anticipation of J2SE >- * 1.5 support, which is planned for the next release of Eclipse after 3.0, and >- * may change slightly before reaching its final form. >- * </p> > * > * @param isStatic <code>true</code> if this is a static import, > * and <code>false</code> if this is a regular import > * @exception UnsupportedOperationException if this operation is used in > * a JLS2 AST >- * @since 3.0 >+ * @since 3.1 > */ > public void setStatic(boolean isStatic) { > unsupportedIn2(); >Index: dom/org/eclipse/jdt/core/dom/Initializer.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Initializer.java,v >retrieving revision 1.30 >diff -u -r1.30 Initializer.java >--- dom/org/eclipse/jdt/core/dom/Initializer.java 23 Feb 2005 02:47:27 -0000 1.30 >+++ dom/org/eclipse/jdt/core/dom/Initializer.java 15 Mar 2005 00:39:06 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2004 IBM Corporation and others. >+ * Copyright (c) 2000, 2005 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -36,13 +36,12 @@ > * The "modifiers" structural property of this node type (JLS2 API only). > * @since 3.0 > */ >- // TODO (jeem) When JLS3 support is complete (post 3.0) - deprecated Replaced by {@link #MODIFIERS2_PROPERTY} in the JLS3 API. > public static final SimplePropertyDescriptor MODIFIERS_PROPERTY = > internalModifiersPropertyFactory(Initializer.class); > > /** > * The "modifiers" structural property of this node type (added in JLS3 API). >- * @since 3.0 >+ * @since 3.1 > */ > public static final ChildListPropertyDescriptor MODIFIERS2_PROPERTY = > internalModifiers2PropertyFactory(Initializer.class); >@@ -66,7 +65,7 @@ > * A list of property descriptors (element type: > * {@link StructuralPropertyDescriptor}), > * or null if uninitialized. >- * @since 3.0 >+ * @since 3.1 > */ > private static final List PROPERTY_DESCRIPTORS_3_0; > >@@ -98,7 +97,7 @@ > * @since 3.0 > */ > public static List propertyDescriptors(int apiLevel) { >- if (apiLevel == AST.JLS2) { >+ if (apiLevel == AST.JLS2_INTERNAL) { > return PROPERTY_DESCRIPTORS_2_0; > } else { > return PROPERTY_DESCRIPTORS_3_0; >@@ -140,7 +139,7 @@ > if (get) { > return getModifiers(); > } else { >- setModifiers(value); >+ internalSetModifiers(value); > return 0; > } > } >@@ -217,8 +216,8 @@ > ASTNode clone0(AST target) { > Initializer result = new Initializer(target); > result.setSourceRange(this.getStartPosition(), this.getLength()); >- if (this.ast.apiLevel == AST.JLS2) { >- result.setModifiers(getModifiers()); >+ if (this.ast.apiLevel == AST.JLS2_INTERNAL) { >+ result.internalSetModifiers(getModifiers()); > } > if (this.ast.apiLevel >= AST.JLS3) { > result.modifiers().addAll(ASTNode.copySubtrees(target, modifiers())); >Index: dom/org/eclipse/jdt/core/dom/Javadoc.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Javadoc.java,v >retrieving revision 1.32 >diff -u -r1.32 Javadoc.java >--- dom/org/eclipse/jdt/core/dom/Javadoc.java 23 Feb 2005 02:47:27 -0000 1.32 >+++ dom/org/eclipse/jdt/core/dom/Javadoc.java 15 Mar 2005 00:39:06 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2004 IBM Corporation and others. >+ * Copyright (c) 2000, 2005 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -32,14 +32,14 @@ > /** > * The "comment" structural property of this node type (JLS2 API only). > * @since 3.0 >+ * @deprecated Replaced by {@link #TAGS_PROPERTY} in the JLS3 API. > */ >- // TODO (jeem) When JLS3 support is complete (post 3.0) - deprecated Replaced by {@link #TAGS_PROPERTY} in the JLS3 API. > public static final SimplePropertyDescriptor COMMENT_PROPERTY = > new SimplePropertyDescriptor(Javadoc.class, "comment", String.class, MANDATORY); //$NON-NLS-1$ > > /** > * The "tags" structural property of this node type. >- * @since 3.0 >+ * @since 3.1 > */ > public static final ChildListPropertyDescriptor TAGS_PROPERTY = > new ChildListPropertyDescriptor(Javadoc.class, "tags", TagElement.class, CYCLE_RISK); //$NON-NLS-1$ >@@ -57,7 +57,7 @@ > * A list of property descriptors (element type: > * {@link StructuralPropertyDescriptor}), > * or null if uninitialized. >- * @since 3.0 >+ * @since 3.1 > */ > private static final List PROPERTY_DESCRIPTORS_3_0; > >@@ -85,7 +85,7 @@ > * @since 3.0 > */ > public static List propertyDescriptors(int apiLevel) { >- if (apiLevel == AST.JLS2) { >+ if (apiLevel == AST.JLS2_INTERNAL) { > return PROPERTY_DESCRIPTORS_2_0; > } else { > return PROPERTY_DESCRIPTORS_3_0; >@@ -178,7 +178,7 @@ > ASTNode clone0(AST target) { > Javadoc result = new Javadoc(target); > result.setSourceRange(this.getStartPosition(), this.getLength()); >- if (this.ast.apiLevel == AST.JLS2) { >+ if (this.ast.apiLevel == AST.JLS2_INTERNAL) { > result.setComment(getComment()); > } > result.tags().addAll(ASTNode.copySubtrees(target, tags())); >Index: dom/org/eclipse/jdt/core/dom/MarkerAnnotation.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MarkerAnnotation.java,v >retrieving revision 1.11 >diff -u -r1.11 MarkerAnnotation.java >--- dom/org/eclipse/jdt/core/dom/MarkerAnnotation.java 23 Feb 2005 02:47:27 -0000 1.11 >+++ dom/org/eclipse/jdt/core/dom/MarkerAnnotation.java 15 Mar 2005 00:39:06 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2004 IBM Corporation and others. >+ * Copyright (c) 2004, 2005 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -22,19 +22,13 @@ > * <b>@</b> TypeName > * </pre> > * </p> >- * <p> >- * Note: This API element is only needed for dealing with Java code that uses >- * new language features of J2SE 1.5. It is included in anticipation of J2SE >- * 1.5 support, which is planned for the next release of Eclipse after 3.0, and >- * may change slightly before reaching its final form. >- * </p> >- * @since 3.0 >+ * >+ * @since 3.1 > */ > public final class MarkerAnnotation extends Annotation { > > /** > * The "typeName" structural property of this node type. >- * @since 3.0 > */ > public static final ChildPropertyDescriptor TYPE_NAME_PROPERTY = > internalTypeNamePropertyFactory(MarkerAnnotation.class); >@@ -43,7 +37,6 @@ > * A list of property descriptors (element type: > * {@link StructuralPropertyDescriptor}), > * or null if uninitialized. >- * @since 3.0 > */ > private static final List PROPERTY_DESCRIPTORS; > >@@ -61,7 +54,6 @@ > * @param apiLevel the API level; one of the AST.JLS* constants > * @return a list of property descriptors (element type: > * {@link StructuralPropertyDescriptor}) >- * @since 3.0 > */ > public static List propertyDescriptors(int apiLevel) { > return PROPERTY_DESCRIPTORS; >@@ -84,7 +76,6 @@ > > /* (omit javadoc for this method) > * Method declared on ASTNode. >- * @since 3.0 > */ > final List internalStructuralPropertiesForType(int apiLevel) { > return propertyDescriptors(apiLevel); >Index: dom/org/eclipse/jdt/core/dom/MemberValuePair.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MemberValuePair.java,v >retrieving revision 1.15 >diff -u -r1.15 MemberValuePair.java >--- dom/org/eclipse/jdt/core/dom/MemberValuePair.java 23 Feb 2005 02:47:27 -0000 1.15 >+++ dom/org/eclipse/jdt/core/dom/MemberValuePair.java 15 Mar 2005 00:39:06 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2004 IBM Corporation and others. >+ * Copyright (c) 2004, 2005 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -24,27 +24,20 @@ > * Within annotations, only certain kinds of expressions are meaningful, > * including other annotations. > * </p> >- * <p> >- * Note: This API element is only needed for dealing with Java code that uses >- * new language features of J2SE 1.5. It is included in anticipation of J2SE >- * 1.5 support, which is planned for the next release of Eclipse after 3.0, and >- * may change slightly before reaching its final form. >- * </p> >+ * > * @see NormalAnnotation >- * @since 3.0 >+ * @since 3.1 > */ > public class MemberValuePair extends ASTNode { > > /** > * The "name" structural property of this node type. >- * @since 3.0 > */ > public static final ChildPropertyDescriptor NAME_PROPERTY = > new ChildPropertyDescriptor(MemberValuePair.class, "name", SimpleName.class, MANDATORY, NO_CYCLE_RISK); //$NON-NLS-1$ > > /** > * The "value" structural property of this node type. >- * @since 3.0 > */ > public static final ChildPropertyDescriptor VALUE_PROPERTY = > new ChildPropertyDescriptor(MemberValuePair.class, "value", Expression.class, MANDATORY, CYCLE_RISK); //$NON-NLS-1$ >Index: dom/org/eclipse/jdt/core/dom/MethodDeclaration.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodDeclaration.java,v >retrieving revision 1.49 >diff -u -r1.49 MethodDeclaration.java >--- dom/org/eclipse/jdt/core/dom/MethodDeclaration.java 23 Feb 2005 02:47:27 -0000 1.49 >+++ dom/org/eclipse/jdt/core/dom/MethodDeclaration.java 15 Mar 2005 00:39:06 -0000 >@@ -75,13 +75,12 @@ > * The "modifiers" structural property of this node type (JLS2 API only). > * @since 3.0 > */ >- // TODO (jeem) When JLS3 support is complete (post 3.0) - deprecated Replaced by {@link #MODIFIERS2_PROPERTY} in the JLS3 API. > public static final SimplePropertyDescriptor MODIFIERS_PROPERTY = > internalModifiersPropertyFactory(MethodDeclaration.class); > > /** > * The "modifiers" structural property of this node type (added in JLS3 API). >- * @since 3.0 >+ * @since 3.1 > */ > public static final ChildListPropertyDescriptor MODIFIERS2_PROPERTY = > internalModifiers2PropertyFactory(MethodDeclaration.class); >@@ -104,13 +103,12 @@ > * The "returnType" structural property of this node type (JLS2 API only). > * @since 3.0 > */ >- // TODO (jeem) When JLS3 support is complete (post 3.0) - deprecated Replaced by {@link #RETURN_TYPE2_PROPERTY} in the JLS3 API. > public static final ChildPropertyDescriptor RETURN_TYPE_PROPERTY = > new ChildPropertyDescriptor(MethodDeclaration.class, "returnType", Type.class, MANDATORY, NO_CYCLE_RISK); //$NON-NLS-1$ > > /** > * The "returnType2" structural property of this node type (added in JLS3 API). >- * @since 3.0 >+ * @since 3.1 > */ > public static final ChildPropertyDescriptor RETURN_TYPE2_PROPERTY = > new ChildPropertyDescriptor(MethodDeclaration.class, "returnType2", Type.class, OPTIONAL, NO_CYCLE_RISK); //$NON-NLS-1$ >@@ -124,7 +122,7 @@ > > /** > * The "typeParameters" structural property of this node type (added in JLS3 API). >- * @since 3.0 >+ * @since 3.1 > */ > public static final ChildListPropertyDescriptor TYPE_PARAMETERS_PROPERTY = > new ChildListPropertyDescriptor(MethodDeclaration.class, "typeParameters", TypeParameter.class, NO_CYCLE_RISK); //$NON-NLS-1$ >@@ -162,7 +160,7 @@ > * A list of property descriptors (element type: > * {@link StructuralPropertyDescriptor}), > * or null if uninitialized. >- * @since 3.0 >+ * @since 3.1 > */ > private static final List PROPERTY_DESCRIPTORS_3_0; > >@@ -205,7 +203,7 @@ > * @since 3.0 > */ > public static List propertyDescriptors(int apiLevel) { >- if (apiLevel == AST.JLS2) { >+ if (apiLevel == AST.JLS2_INTERNAL) { > return PROPERTY_DESCRIPTORS_2_0; > } else { > return PROPERTY_DESCRIPTORS_3_0; >@@ -242,7 +240,7 @@ > > /** > * Indicated whether the return type has been initialized. >- * @since 3.0 >+ * @since 3.1 > */ > private boolean returnType2Initialized = false; > >@@ -250,7 +248,7 @@ > * The type paramters (element type: <code>TypeParameter</code>). > * Null in JLS2. Added in JLS3; defaults to an empty list > * (see constructor). >- * @since 3.0 >+ * @since 3.1 > */ > private ASTNode.NodeList typeParameters = null; > >@@ -313,7 +311,7 @@ > if (get) { > return getModifiers(); > } else { >- setModifiers(value); >+ internalSetModifiers(value); > return 0; > } > } >@@ -449,8 +447,8 @@ > result.setSourceRange(this.getStartPosition(), this.getLength()); > result.setJavadoc( > (Javadoc) ASTNode.copySubtree(target, getJavadoc())); >- if (this.ast.apiLevel == AST.JLS2) { >- result.setModifiers(getModifiers()); >+ if (this.ast.apiLevel == AST.JLS2_INTERNAL) { >+ result.internalSetModifiers(getModifiers()); > result.setReturnType( > (Type) ASTNode.copySubtree(target, getReturnType())); > } >@@ -489,7 +487,7 @@ > if (visitChildren) { > // visit children in normal left to right reading order > acceptChild(visitor, getJavadoc()); >- if (this.ast.apiLevel == AST.JLS2) { >+ if (this.ast.apiLevel == AST.JLS2_INTERNAL) { > acceptChild(visitor, getReturnType()); > } else { > acceptChildren(visitor, this.modifiers); >@@ -530,18 +528,12 @@ > /** > * Returns the live ordered list of type parameters of this method > * declaration (added in JLS3 API). This list is non-empty for parameterized methods. >- * <p> >- * Note: This API element is only needed for dealing with Java code that uses >- * new language features of J2SE 1.5. It is included in anticipation of J2SE >- * 1.5 support, which is planned for the next release of Eclipse after 3.0, and >- * may change slightly before reaching its final form. >- * </p> > * > * @return the live list of type parameters > * (element type: <code>TypeParameter</code>) > * @exception UnsupportedOperationException if this operation is used in > * a JLS2 AST >- * @since 3.0 >+ * @since 3.1 > */ > public List typeParameters() { > // more efficient than just calling unsupportedIn2() to check >@@ -609,19 +601,13 @@ > * Returns whether this method declaration declares a > * variable arity method (added in JLS3 API). The convenience method checks > * whether the last parameter is so marked. >- * <p> >- * Note: This API element is only needed for dealing with Java code that uses >- * new language features of J2SE 1.5. It is included in anticipation of J2SE >- * 1.5 support, which is planned for the next release of Eclipse after 3.0, and >- * may change slightly before reaching its final form. >- * </p> > * > * @return <code>true</code> if this is a variable arity method declaration, > * and <code>false</code> otherwise > * @exception UnsupportedOperationException if this operation is used in > * a JLS2 AST > * @see SingleVariableDeclaration#isVarargs() >- * @since 3.0 >+ * @since 3.1 > */ > public boolean isVarargs() { > // more efficient than just calling unsupportedIn2() to check >@@ -661,10 +647,20 @@ > * @return the return type, possibly the void primitive type > * @exception UnsupportedOperationException if this operation is used in > * an AST later than JLS2 >+ * @deprecated In the JLS3 API, this method is replaced by {@link #getReturnType2()}, >+ * which may return <code>null</code>. > */ >- // TODO (jeem) When JLS3 support is complete (post 3.0) - deprecated In the JLS3 API, this method is replaced by <code>getReturnType2</code>, which may return <code>null</code>. > public Type getReturnType() { >- supportedOnlyIn2(); >+ return internalGetReturnType(); >+ } >+ >+ /** >+ * Internal synonym for deprecated method. Used to avoid >+ * deprecation warnings. >+ * @since 3.1 >+ */ >+ /*package*/ final Type internalGetReturnType() { >+ supportedOnlyIn2(); > if (this.returnType == null) { > // lazy init must be thread-safe for readers > synchronized (this) { >@@ -695,9 +691,19 @@ > * </ul> > * @exception UnsupportedOperationException if this operation is used in > * an AST later than JLS2 >+ * @deprecated In the JLS3 API, this method is replaced by >+ * {@link #setReturnType2(Type)}, which accepts <code>null</code>. > */ >- // TODO (jeem) When JLS3 support is complete (post 3.0) - deprecated In the JLS3 API, this method is replaced by <code>setReturnType2</code>, which accepts <code>null</code>. > public void setReturnType(Type type) { >+ internalSetReturnType(type); >+ } >+ >+ /** >+ * Internal synonym for deprecated method. Used to avoid >+ * deprecation warnings. >+ * @since 3.1 >+ */ >+ /*package*/ void internalSetReturnType(Type type) { > supportedOnlyIn2(); > if (type == null) { > throw new IllegalArgumentException(); >@@ -724,7 +730,7 @@ > * or <code>null</code> if none > * @exception UnsupportedOperationException if this operation is used in > * a JLS2 AST >- * @since 3.0 >+ * @since 3.1 > */ > public Type getReturnType2() { > unsupportedIn2(); >@@ -762,7 +768,7 @@ > * <li>the node belongs to a different AST</li> > * <li>the node already has a parent</li> > * </ul> >- * @since 3.0 >+ * @since 3.1 > */ > public void setReturnType2(Type type) { > unsupportedIn2(); >Index: dom/org/eclipse/jdt/core/dom/MethodInvocation.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodInvocation.java,v >retrieving revision 1.27 >diff -u -r1.27 MethodInvocation.java >--- dom/org/eclipse/jdt/core/dom/MethodInvocation.java 23 Feb 2005 02:47:27 -0000 1.27 >+++ dom/org/eclipse/jdt/core/dom/MethodInvocation.java 15 Mar 2005 00:39:06 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2004 IBM Corporation and others. >+ * Copyright (c) 2000, 2005 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -43,7 +43,7 @@ > > /** > * The "typeArguments" structural property of this node type (added in JLS3 API). >- * @since 3.0 >+ * @since 3.1 > */ > public static final ChildListPropertyDescriptor TYPE_ARGUMENTS_PROPERTY = > new ChildListPropertyDescriptor(MethodInvocation.class, "typeArguments", Type.class, NO_CYCLE_RISK); //$NON-NLS-1$ >@@ -74,7 +74,7 @@ > * A list of property descriptors (element type: > * {@link StructuralPropertyDescriptor}), > * or null if uninitialized. >- * @since 3.0 >+ * @since 3.1 > */ > private static final List PROPERTY_DESCRIPTORS_3_0; > >@@ -107,7 +107,7 @@ > * @since 3.0 > */ > public static List propertyDescriptors(int apiLevel) { >- if (apiLevel == AST.JLS2) { >+ if (apiLevel == AST.JLS2_INTERNAL) { > return PROPERTY_DESCRIPTORS_2_0; > } else { > return PROPERTY_DESCRIPTORS_3_0; >@@ -123,7 +123,7 @@ > * The type arguments (element type: <code>Type</code>). > * Null in JLS2. Added in JLS3; defaults to an empty list > * (see constructor). >- * @since 3.0 >+ * @since 3.1 > */ > private ASTNode.NodeList typeArguments = null; > >@@ -279,18 +279,12 @@ > /** > * Returns the live ordered list of type arguments of this method > * invocation (added in JLS3 API). >- * <p> >- * Note: This API element is only needed for dealing with Java code that uses >- * new language features of J2SE 1.5. It is included in anticipation of J2SE >- * 1.5 support, which is planned for the next release of Eclipse after 3.0, and >- * may change slightly before reaching its final form. >- * </p> > * > * @return the live list of type arguments > * (element type: <code>Type</code>) > * @exception UnsupportedOperationException if this operation is used in > * a JLS2 AST >- * @since 3.0 >+ * @since 3.1 > */ > public List typeArguments() { > // more efficient than just calling unsupportedIn2() to check >Index: dom/org/eclipse/jdt/core/dom/MethodRefParameter.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodRefParameter.java,v >retrieving revision 1.13 >diff -u -r1.13 MethodRefParameter.java >--- dom/org/eclipse/jdt/core/dom/MethodRefParameter.java 11 Mar 2005 23:39:33 -0000 1.13 >+++ dom/org/eclipse/jdt/core/dom/MethodRefParameter.java 15 Mar 2005 00:39:06 -0000 >@@ -73,7 +73,7 @@ > * A list of property descriptors (element type: > * {@link StructuralPropertyDescriptor}), > * or null if uninitialized. >- * @since 3.0 >+ * @since 3.1 > */ > private static final List PROPERTY_DESCRIPTORS_3_0; > >@@ -102,7 +102,7 @@ > * @since 3.0 > */ > public static List propertyDescriptors(int apiLevel) { >- if (apiLevel == AST.JLS2) { >+ if (apiLevel == AST.JLS2_INTERNAL) { > return PROPERTY_DESCRIPTORS_2_0; > } else { > return PROPERTY_DESCRIPTORS_3_0; >Index: dom/org/eclipse/jdt/core/dom/NaiveASTFlattener.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/NaiveASTFlattener.java,v >retrieving revision 1.44 >diff -u -r1.44 NaiveASTFlattener.java >--- dom/org/eclipse/jdt/core/dom/NaiveASTFlattener.java 11 Mar 2005 23:39:33 -0000 1.44 >+++ dom/org/eclipse/jdt/core/dom/NaiveASTFlattener.java 15 Mar 2005 00:39:06 -0000 >@@ -131,7 +131,7 @@ > > /* > * @see ASTVisitor#visit(AnnotationTypeDeclaration) >- * @since 3.0 >+ * @since 3.1 > */ > public boolean visit(AnnotationTypeDeclaration node) { > if (node.getJavadoc() != null) { >@@ -152,7 +152,7 @@ > > /* > * @see ASTVisitor#visit(AnnotationTypeMemberDeclaration) >- * @since 3.0 >+ * @since 3.1 > */ > public boolean visit(AnnotationTypeMemberDeclaration node) { > if (node.getJavadoc() != null) { >@@ -366,8 +366,8 @@ > this.buffer.append(".");//$NON-NLS-1$ > } > this.buffer.append("new ");//$NON-NLS-1$ >- if (node.getAST().apiLevel() == AST.JLS2) { >- node.getName().accept(this); >+ if (node.getAST().apiLevel() == AST.JLS2_INTERNAL) { >+ node.internalGetName().accept(this); > } > if (node.getAST().apiLevel() >= AST.JLS3) { > if (!node.typeArguments().isEmpty()) { >@@ -496,7 +496,7 @@ > > /* > * @see ASTVisitor#visit(EnhancedForStatement) >- * @since 3.0 >+ * @since 3.1 > */ > public boolean visit(EnhancedForStatement node) { > printIndent(); >@@ -511,7 +511,7 @@ > > /* > * @see ASTVisitor#visit(EnumConstantDeclaration) >- * @since 3.0 >+ * @since 3.1 > */ > public boolean visit(EnumConstantDeclaration node) { > if (node.getJavadoc() != null) { >@@ -539,7 +539,7 @@ > > /* > * @see ASTVisitor#visit(EnumDeclaration) >- * @since 3.0 >+ * @since 3.1 > */ > public boolean visit(EnumDeclaration node) { > if (node.getJavadoc() != null) { >@@ -611,7 +611,7 @@ > node.getJavadoc().accept(this); > } > printIndent(); >- if (node.getAST().apiLevel() == AST.JLS2) { >+ if (node.getAST().apiLevel() == AST.JLS2_INTERNAL) { > printModifiers(node.getModifiers()); > } > if (node.getAST().apiLevel() >= AST.JLS3) { >@@ -727,7 +727,7 @@ > if (node.getJavadoc() != null) { > node.getJavadoc().accept(this); > } >- if (node.getAST().apiLevel() == AST.JLS2) { >+ if (node.getAST().apiLevel() == AST.JLS2_INTERNAL) { > printModifiers(node.getModifiers()); > } > if (node.getAST().apiLevel() >= AST.JLS3) { >@@ -773,7 +773,7 @@ > > /* > * @see ASTVisitor#visit(MarkerAnnotation) >- * @since 3.0 >+ * @since 3.1 > */ > public boolean visit(MarkerAnnotation node) { > this.buffer.append("@");//$NON-NLS-1$ >@@ -796,7 +796,7 @@ > > /* > * @see ASTVisitor#visit(MemberValuePair) >- * @since 3.0 >+ * @since 3.1 > */ > public boolean visit(MemberValuePair node) { > node.getName().accept(this); >@@ -853,7 +853,7 @@ > node.getJavadoc().accept(this); > } > printIndent(); >- if (node.getAST().apiLevel() == AST.JLS2) { >+ if (node.getAST().apiLevel() == AST.JLS2_INTERNAL) { > printModifiers(node.getModifiers()); > } > if (node.getAST().apiLevel() >= AST.JLS3) { >@@ -871,8 +871,8 @@ > } > } > if (!node.isConstructor()) { >- if (node.getAST().apiLevel() == AST.JLS2) { >- node.getReturnType().accept(this); >+ if (node.getAST().apiLevel() == AST.JLS2_INTERNAL) { >+ node.internalGetReturnType().accept(this); > } else { > if (node.getReturnType2() != null) { > node.getReturnType2().accept(this); >@@ -951,7 +951,7 @@ > > /* > * @see ASTVisitor#visit(Modifier) >- * @since 3.0 >+ * @since 3.1 > */ > public boolean visit(Modifier node) { > this.buffer.append(node.getKeyword().toString()); >@@ -960,7 +960,7 @@ > > /* > * @see ASTVisitor#visit(NormalAnnotation) >- * @since 3.0 >+ * @since 3.1 > */ > public boolean visit(NormalAnnotation node) { > this.buffer.append("@");//$NON-NLS-1$ >@@ -1016,7 +1016,7 @@ > > /* > * @see ASTVisitor#visit(ParameterizedType) >- * @since 3.0 >+ * @since 3.1 > */ > public boolean visit(ParameterizedType node) { > node.getType().accept(this); >@@ -1080,7 +1080,7 @@ > > /* > * @see ASTVisitor#visit(QualifiedType) >- * @since 3.0 >+ * @since 3.1 > */ > public boolean visit(QualifiedType node) { > node.getQualifier().accept(this); >@@ -1120,7 +1120,7 @@ > > /* > * @see ASTVisitor#visit(SingleMemberAnnotation) >- * @since 3.0 >+ * @since 3.1 > */ > public boolean visit(SingleMemberAnnotation node) { > this.buffer.append("@");//$NON-NLS-1$ >@@ -1136,7 +1136,7 @@ > */ > public boolean visit(SingleVariableDeclaration node) { > printIndent(); >- if (node.getAST().apiLevel() == AST.JLS2) { >+ if (node.getAST().apiLevel() == AST.JLS2_INTERNAL) { > printModifiers(node.getModifiers()); > } > if (node.getAST().apiLevel() >= AST.JLS3) { >@@ -1394,7 +1394,7 @@ > if (node.getJavadoc() != null) { > node.getJavadoc().accept(this); > } >- if (node.getAST().apiLevel() == AST.JLS2) { >+ if (node.getAST().apiLevel() == AST.JLS2_INTERNAL) { > printModifiers(node.getModifiers()); > } > if (node.getAST().apiLevel() >= AST.JLS3) { >@@ -1416,15 +1416,15 @@ > } > } > this.buffer.append(" ");//$NON-NLS-1$ >- if (node.getAST().apiLevel() == AST.JLS2) { >- if (node.getSuperclass() != null) { >+ if (node.getAST().apiLevel() == AST.JLS2_INTERNAL) { >+ if (node.internalGetSuperclass() != null) { > this.buffer.append("extends ");//$NON-NLS-1$ >- node.getSuperclass().accept(this); >+ node.internalGetSuperclass().accept(this); > this.buffer.append(" ");//$NON-NLS-1$ > } >- if (!node.superInterfaces().isEmpty()) { >+ if (!node.internalSuperInterfaces().isEmpty()) { > this.buffer.append(node.isInterface() ? "extends " : "implements ");//$NON-NLS-2$//$NON-NLS-1$ >- for (Iterator it = node.superInterfaces().iterator(); it.hasNext(); ) { >+ for (Iterator it = node.internalSuperInterfaces().iterator(); it.hasNext(); ) { > Name n = (Name) it.next(); > n.accept(this); > if (it.hasNext()) { >@@ -1480,8 +1480,8 @@ > * @see ASTVisitor#visit(TypeDeclarationStatement) > */ > public boolean visit(TypeDeclarationStatement node) { >- if (node.getAST().apiLevel() == AST.JLS2) { >- node.getTypeDeclaration().accept(this); >+ if (node.getAST().apiLevel() == AST.JLS2_INTERNAL) { >+ node.internalGetTypeDeclaration().accept(this); > } > if (node.getAST().apiLevel() >= AST.JLS3) { > node.getDeclaration().accept(this); >@@ -1500,7 +1500,7 @@ > > /* > * @see ASTVisitor#visit(TypeParameter) >- * @since 3.0 >+ * @since 3.1 > */ > public boolean visit(TypeParameter node) { > node.getName().accept(this); >@@ -1521,7 +1521,7 @@ > * @see ASTVisitor#visit(VariableDeclarationExpression) > */ > public boolean visit(VariableDeclarationExpression node) { >- if (node.getAST().apiLevel() == AST.JLS2) { >+ if (node.getAST().apiLevel() == AST.JLS2_INTERNAL) { > printModifiers(node.getModifiers()); > } > if (node.getAST().apiLevel() >= AST.JLS3) { >@@ -1559,7 +1559,7 @@ > */ > public boolean visit(VariableDeclarationStatement node) { > printIndent(); >- if (node.getAST().apiLevel() == AST.JLS2) { >+ if (node.getAST().apiLevel() == AST.JLS2_INTERNAL) { > printModifiers(node.getModifiers()); > } > if (node.getAST().apiLevel() >= AST.JLS3) { >@@ -1580,7 +1580,7 @@ > > /* > * @see ASTVisitor#visit(WildcardType) >- * @since 3.0 >+ * @since 3.1 > */ > public boolean visit(WildcardType node) { > this.buffer.append("?");//$NON-NLS-1$ >Index: dom/org/eclipse/jdt/core/dom/NormalAnnotation.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/NormalAnnotation.java,v >retrieving revision 1.11 >diff -u -r1.11 NormalAnnotation.java >--- dom/org/eclipse/jdt/core/dom/NormalAnnotation.java 23 Feb 2005 02:47:27 -0000 1.11 >+++ dom/org/eclipse/jdt/core/dom/NormalAnnotation.java 15 Mar 2005 00:39:06 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2004 IBM Corporation and others. >+ * Copyright (c) 2004, 2005 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -21,19 +21,13 @@ > * <b>@</b> TypeName <b>(</b> [ MemberValuePair { <b>,</b> MemberValuePair } ] <b>)</b> > * </pre> > * </p> >- * <p> >- * Note: This API element is only needed for dealing with Java code that uses >- * new language features of J2SE 1.5. It is included in anticipation of J2SE >- * 1.5 support, which is planned for the next release of Eclipse after 3.0, and >- * may change slightly before reaching its final form. >- * </p> >- * @since 3.0 >+ * >+ * @since 3.1 > */ > public final class NormalAnnotation extends Annotation { > > /** > * The "typeName" structural property of this node type. >- * @since 3.0 > */ > public static final ChildPropertyDescriptor TYPE_NAME_PROPERTY = > internalTypeNamePropertyFactory(NormalAnnotation.class); >@@ -48,7 +42,6 @@ > * A list of property descriptors (element type: > * {@link StructuralPropertyDescriptor}), > * or null if uninitialized. >- * @since 3.0 > */ > private static final List PROPERTY_DESCRIPTORS; > >@@ -67,7 +60,6 @@ > * @param apiLevel the API level; one of the AST.JLS* constants > * @return a list of property descriptors (element type: > * {@link StructuralPropertyDescriptor}) >- * @since 3.0 > */ > public static List propertyDescriptors(int apiLevel) { > return PROPERTY_DESCRIPTORS; >@@ -98,7 +90,6 @@ > > /* (omit javadoc for this method) > * Method declared on ASTNode. >- * @since 3.0 > */ > final List internalStructuralPropertiesForType(int apiLevel) { > return propertyDescriptors(apiLevel); >Index: dom/org/eclipse/jdt/core/dom/PackageDeclaration.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/PackageDeclaration.java,v >retrieving revision 1.27 >diff -u -r1.27 PackageDeclaration.java >--- dom/org/eclipse/jdt/core/dom/PackageDeclaration.java 23 Feb 2005 02:47:27 -0000 1.27 >+++ dom/org/eclipse/jdt/core/dom/PackageDeclaration.java 15 Mar 2005 00:39:06 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2004 IBM Corporation and others. >+ * Copyright (c) 2000, 2005 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -41,7 +41,7 @@ > > /** > * The "annotations" structural property of this node type (added in JLS3 API). >- * @since 3.0 >+ * @since 3.1 > */ > public static final ChildListPropertyDescriptor ANNOTATIONS_PROPERTY = > new ChildListPropertyDescriptor(PackageDeclaration.class, "annotations", Annotation.class, CYCLE_RISK); //$NON-NLS-1$ >@@ -65,7 +65,7 @@ > * A list of property descriptors (element type: > * {@link StructuralPropertyDescriptor}), > * or null if uninitialized. >- * @since 3.0 >+ * @since 3.1 > */ > private static final List PROPERTY_DESCRIPTORS_3_0; > >@@ -95,7 +95,7 @@ > * @since 3.0 > */ > public static List propertyDescriptors(int apiLevel) { >- if (apiLevel == AST.JLS2) { >+ if (apiLevel == AST.JLS2_INTERNAL) { > return PROPERTY_DESCRIPTORS_2_0; > } else { > return PROPERTY_DESCRIPTORS_3_0; >@@ -113,7 +113,7 @@ > * The annotations (element type: <code>Annotation</code>). > * Null in JLS2. Added in JLS3; defaults to an empty list > * (see constructor). >- * @since 3.0 >+ * @since 3.1 > */ > private ASTNode.NodeList annotations = null; > >@@ -231,18 +231,12 @@ > /** > * Returns the live ordered list of annotations of this > * package declaration (added in JLS3 API). >- * <p> >- * Note: This API element is only needed for dealing with Java code that uses >- * new language features of J2SE 1.5. It is included in anticipation of J2SE >- * 1.5 support, which is planned for the next release of Eclipse after 3.0, and >- * may change slightly before reaching its final form. >- * </p> > * > * @return the live list of annotations > * (element type: <code>Annotation</code>) > * @exception UnsupportedOperationException if this operation is used in > * a JLS2 AST >- * @since 3.0 >+ * @since 3.1 > */ > public List annotations() { > // more efficient than just calling unsupportedIn2() to check >Index: dom/org/eclipse/jdt/core/dom/ParameterizedType.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ParameterizedType.java,v >retrieving revision 1.21 >diff -u -r1.21 ParameterizedType.java >--- dom/org/eclipse/jdt/core/dom/ParameterizedType.java 23 Feb 2005 02:47:27 -0000 1.21 >+++ dom/org/eclipse/jdt/core/dom/ParameterizedType.java 15 Mar 2005 00:39:06 -0000 >@@ -24,14 +24,8 @@ > * </pre> > * The first type may be a simple type or a qualified type; > * other kinds of types are meaningless. >- * <p> >- * Note: This API element is only needed for dealing with Java code that uses >- * new language features of J2SE 1.5. It is included in anticipation of J2SE >- * 1.5 support, which is planned for the next release of Eclipse after 3.0, and >- * may change slightly before reaching its final form. >- * </p> > * >- * @since 3.0 >+ * @since 3.1 > */ > public class ParameterizedType extends Type { > /** >@@ -41,14 +35,12 @@ > > /** > * The "type" structural property of this node type. >- * @since 3.0 > */ > public static final ChildPropertyDescriptor TYPE_PROPERTY = > new ChildPropertyDescriptor(ParameterizedType.class, "type", Type.class, MANDATORY, CYCLE_RISK); //$NON-NLS-1$ > > /** > * The "typeArguments" structural property of this node type. >- * @since 3.0 > */ > public static final ChildListPropertyDescriptor TYPE_ARGUMENTS_PROPERTY = > new ChildListPropertyDescriptor(ParameterizedType.class, "typeArguments", Type.class, CYCLE_RISK); //$NON-NLS-1$ >@@ -77,7 +69,6 @@ > > * @return a list of property descriptors (element type: > * {@link StructuralPropertyDescriptor}) >- * @since 3.0 > */ > public static List propertyDescriptors(int apiLevel) { > return PROPERTY_DESCRIPTORS; >Index: dom/org/eclipse/jdt/core/dom/QualifiedType.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/QualifiedType.java,v >retrieving revision 1.18 >diff -u -r1.18 QualifiedType.java >--- dom/org/eclipse/jdt/core/dom/QualifiedType.java 23 Feb 2005 02:47:27 -0000 1.18 >+++ dom/org/eclipse/jdt/core/dom/QualifiedType.java 15 Mar 2005 00:39:06 -0000 >@@ -41,7 +41,7 @@ > * became possible as of JLS3; only the second form existed in JLS2 API.) > * </p> > * >- * @since 3.0 >+ * @since 3.1 > */ > public class QualifiedType extends Type { > /** >@@ -51,14 +51,12 @@ > > /** > * The "qualifier" structural property of this node type. >- * @since 3.0 > */ > public static final ChildPropertyDescriptor QUALIFIER_PROPERTY = > new ChildPropertyDescriptor(QualifiedType.class, "qualifier", Type.class, MANDATORY, CYCLE_RISK); //$NON-NLS-1$ > > /** > * The "name" structural property of this node type. >- * @since 3.0 > */ > public static final ChildPropertyDescriptor NAME_PROPERTY = > new ChildPropertyDescriptor(QualifiedType.class, "name", SimpleName.class, MANDATORY, NO_CYCLE_RISK); //$NON-NLS-1$ >@@ -86,7 +84,6 @@ > * <code>AST.JLS*</code> constants > * @return a list of property descriptors (element type: > * {@link StructuralPropertyDescriptor}) >- * @since 3.0 > */ > public static List propertyDescriptors(int apiLevel) { > return PROPERTY_DESCRIPTORS; >Index: dom/org/eclipse/jdt/core/dom/SingleMemberAnnotation.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SingleMemberAnnotation.java,v >retrieving revision 1.15 >diff -u -r1.15 SingleMemberAnnotation.java >--- dom/org/eclipse/jdt/core/dom/SingleMemberAnnotation.java 23 Feb 2005 02:47:27 -0000 1.15 >+++ dom/org/eclipse/jdt/core/dom/SingleMemberAnnotation.java 15 Mar 2005 00:39:06 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2004 IBM Corporation and others. >+ * Copyright (c) 2004, 2005 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -24,26 +24,19 @@ > * Within annotations, only certain kinds of expressions are meaningful, > * including other annotations. > * </p> >- * <p> >- * Note: This API element is only needed for dealing with Java code that uses >- * new language features of J2SE 1.5. It is included in anticipation of J2SE >- * 1.5 support, which is planned for the next release of Eclipse after 3.0, and >- * may change slightly before reaching its final form. >- * </p> >- * @since 3.0 >+ * >+ * @since 3.1 > */ > public final class SingleMemberAnnotation extends Annotation { > > /** > * The "typeName" structural property of this node type. >- * @since 3.0 > */ > public static final ChildPropertyDescriptor TYPE_NAME_PROPERTY = > internalTypeNamePropertyFactory(SingleMemberAnnotation.class); > > /** > * The "value" structural property of this node type. >- * @since 3.0 > */ > public static final ChildPropertyDescriptor VALUE_PROPERTY = > new ChildPropertyDescriptor(SingleMemberAnnotation.class, "value", Expression.class, MANDATORY, CYCLE_RISK); //$NON-NLS-1$ >@@ -52,7 +45,6 @@ > * A list of property descriptors (element type: > * {@link StructuralPropertyDescriptor}), > * or null if uninitialized. >- * @since 3.0 > */ > private static final List PROPERTY_DESCRIPTORS; > >@@ -71,7 +63,6 @@ > * @param apiLevel the API level; one of the AST.JLS* constants > * @return a list of property descriptors (element type: > * {@link StructuralPropertyDescriptor}) >- * @since 3.0 > */ > public static List propertyDescriptors(int apiLevel) { > return PROPERTY_DESCRIPTORS; >@@ -100,7 +91,6 @@ > > /* (omit javadoc for this method) > * Method declared on ASTNode. >- * @since 3.0 > */ > final List internalStructuralPropertiesForType(int apiLevel) { > return propertyDescriptors(apiLevel); >Index: dom/org/eclipse/jdt/core/dom/SingleVariableDeclaration.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SingleVariableDeclaration.java,v >retrieving revision 1.41 >diff -u -r1.41 SingleVariableDeclaration.java >--- dom/org/eclipse/jdt/core/dom/SingleVariableDeclaration.java 25 Feb 2005 15:12:58 -0000 1.41 >+++ dom/org/eclipse/jdt/core/dom/SingleVariableDeclaration.java 15 Mar 2005 00:39:06 -0000 >@@ -41,13 +41,12 @@ > * The "modifiers" structural property of this node type (JLS2 API only). > * @since 3.0 > */ >- // TODO (jeem) When JLS3 support is complete (post 3.0) - deprecated Replaced by {@link #MODIFIERS2_PROPERTY} in the JLS3 API. > public static final SimplePropertyDescriptor MODIFIERS_PROPERTY = > new SimplePropertyDescriptor(SingleVariableDeclaration.class, "modifiers", int.class, MANDATORY); //$NON-NLS-1$ > > /** > * The "modifiers" structural property of this node type (added in JLS3 API). >- * @since 3.0 >+ * @since 3.1 > */ > public static final ChildListPropertyDescriptor MODIFIERS2_PROPERTY = > new ChildListPropertyDescriptor(SingleVariableDeclaration.class, "modifiers", IExtendedModifier.class, CYCLE_RISK); //$NON-NLS-1$ >@@ -68,7 +67,7 @@ > > /** > * The "varargs" structural property of this node type (added in JLS3 API). >- * @since 3.0 >+ * @since 3.1 > */ > public static final SimplePropertyDescriptor VARARGS_PROPERTY = > new SimplePropertyDescriptor(SingleVariableDeclaration.class, "varargs", boolean.class, MANDATORY); //$NON-NLS-1$ >@@ -99,7 +98,7 @@ > * A list of property descriptors (element type: > * {@link StructuralPropertyDescriptor}), > * or null if uninitialized. >- * @since 3.0 >+ * @since 3.1 > */ > private static final List PROPERTY_DESCRIPTORS_3_0; > >@@ -135,7 +134,7 @@ > * @since 3.0 > */ > public static List propertyDescriptors(int apiLevel) { >- if (apiLevel == AST.JLS2) { >+ if (apiLevel == AST.JLS2_INTERNAL) { > return PROPERTY_DESCRIPTORS_2_0; > } else { > return PROPERTY_DESCRIPTORS_3_0; >@@ -147,7 +146,7 @@ > * Null in JLS2. Added in JLS3; defaults to an empty list > * (see constructor). > * >- * @since 3.0 >+ * @since 3.1 > */ > private ASTNode.NodeList modifiers = null; > >@@ -173,7 +172,7 @@ > * Indicates the last parameter of a variable arity method; > * defaults to false. > * >- * @since 3.0 >+ * @since 3.1 > */ > private boolean variableArity = false; > >@@ -336,7 +335,7 @@ > ASTNode clone0(AST target) { > SingleVariableDeclaration result = new SingleVariableDeclaration(target); > result.setSourceRange(this.getStartPosition(), this.getLength()); >- if (this.ast.apiLevel == AST.JLS2) { >+ if (this.ast.apiLevel == AST.JLS2_INTERNAL) { > result.setModifiers(getModifiers()); > } else { > result.modifiers().addAll(ASTNode.copySubtrees(target, modifiers())); >@@ -387,7 +386,7 @@ > * (element type: <code>IExtendedModifier</code>) > * @exception UnsupportedOperationException if this operation is used in > * a JLS2 AST >- * @since 3.0 >+ * @since 3.1 > */ > public List modifiers() { > // more efficient than just calling unsupportedIn2() to check >@@ -439,12 +438,22 @@ > * @exception UnsupportedOperationException if this operation is used in > * an AST later than JLS2 > * @see Modifier >+ * @deprecated In the JLS3 API, this method is replaced by >+ * {@link #modifiers()} which contains a list of a <code>Modifier</code> nodes. > */ >- // TODO (jeem) When JLS3 support is complete (post 3.0) - deprecated In the JLS3 API, this method is replaced by <code>modifiers()</code> which contains a list of a <code>Modifier</code> nodes. > public void setModifiers(int modifiers) { >+ internalSetModifiers(modifiers); >+ } >+ >+ /** >+ * Internal synonym for deprecated method. Used to avoid >+ * deprecation warnings. >+ * @since 3.1 >+ */ >+ /*package*/ final void internalSetModifiers(int pmodifiers) { > supportedOnlyIn2(); > preValueChange(MODIFIERS_PROPERTY); >- this.modifierFlags = modifiers; >+ this.modifierFlags = pmodifiers; > postValueChange(MODIFIERS_PROPERTY); > } > >@@ -536,7 +545,7 @@ > * and <code>false</code> otherwise > * @exception UnsupportedOperationException if this operation is used in > * a JLS2 AST >- * @since 3.0 >+ * @since 3.1 > */ > public boolean isVarargs() { > // more efficient than just calling unsupportedIn2() to check >@@ -549,16 +558,10 @@ > /** > * Sets whether this declaration declares the last parameter of > * a variable arity method (added in JLS3 API). >- * <p> >- * Note: This API element is only needed for dealing with Java code that uses >- * new language features of J2SE 1.5. It is included in anticipation of J2SE >- * 1.5 support, which is planned for the next release of Eclipse after 3.0, and >- * may change slightly before reaching its final form. >- * </p> > * > * @param variableArity <code>true</code> if this is a variable arity > * parameter declaration, and <code>false</code> otherwise >- * @since 3.0 >+ * @since 3.1 > */ > public void setVarargs(boolean variableArity) { > // more efficient than just calling unsupportedIn2() to check >Index: dom/org/eclipse/jdt/core/dom/SuperConstructorInvocation.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SuperConstructorInvocation.java,v >retrieving revision 1.25 >diff -u -r1.25 SuperConstructorInvocation.java >--- dom/org/eclipse/jdt/core/dom/SuperConstructorInvocation.java 23 Feb 2005 02:47:27 -0000 1.25 >+++ dom/org/eclipse/jdt/core/dom/SuperConstructorInvocation.java 15 Mar 2005 00:39:06 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2004 IBM Corporation and others. >+ * Copyright (c) 2000, 2005 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -42,7 +42,7 @@ > > /** > * The "typeArguments" structural property of this node type (added in JLS3 API). >- * @since 3.0 >+ * @since 3.1 > */ > public static final ChildListPropertyDescriptor TYPE_ARGUMENTS_PROPERTY = > new ChildListPropertyDescriptor(SuperConstructorInvocation.class, "typeArguments", Type.class, NO_CYCLE_RISK); //$NON-NLS-1$ >@@ -66,7 +66,7 @@ > * A list of property descriptors (element type: > * {@link StructuralPropertyDescriptor}), > * or null if uninitialized. >- * @since 3.0 >+ * @since 3.1 > */ > private static final List PROPERTY_DESCRIPTORS_3_0; > >@@ -97,7 +97,7 @@ > * @since 3.0 > */ > public static List propertyDescriptors(int apiLevel) { >- if (apiLevel == AST.JLS2) { >+ if (apiLevel == AST.JLS2_INTERNAL) { > return PROPERTY_DESCRIPTORS_2_0; > } else { > return PROPERTY_DESCRIPTORS_3_0; >@@ -113,7 +113,7 @@ > * The type arguments (element type: <code>Type</code>). > * Null in JLS2. Added in JLS3; defaults to an empty list > * (see constructor). >- * @since 3.0 >+ * @since 3.1 > */ > private ASTNode.NodeList typeArguments = null; > >@@ -255,18 +255,12 @@ > /** > * Returns the live ordered list of type arguments of this constructor > * invocation (added in JLS3 API). >- * <p> >- * Note: This API element is only needed for dealing with Java code that uses >- * new language features of J2SE 1.5. It is included in anticipation of J2SE >- * 1.5 support, which is planned for the next release of Eclipse after 3.0, and >- * may change slightly before reaching its final form. >- * </p> > * > * @return the live list of type arguments > * (element type: <code>Type</code>) > * @exception UnsupportedOperationException if this operation is used in > * a JLS2 AST >- * @since 3.0 >+ * @since 3.1 > */ > public List typeArguments() { > // more efficient than just calling unsupportedIn2() to check >Index: dom/org/eclipse/jdt/core/dom/SuperMethodInvocation.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SuperMethodInvocation.java,v >retrieving revision 1.27 >diff -u -r1.27 SuperMethodInvocation.java >--- dom/org/eclipse/jdt/core/dom/SuperMethodInvocation.java 23 Feb 2005 02:47:27 -0000 1.27 >+++ dom/org/eclipse/jdt/core/dom/SuperMethodInvocation.java 15 Mar 2005 00:39:06 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2004 IBM Corporation and others. >+ * Copyright (c) 2000, 2005 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -43,7 +43,7 @@ > > /** > * The "typeArguments" structural property of this node type (added in JLS3 API). >- * @since 3.0 >+ * @since 3.1 > */ > public static final ChildListPropertyDescriptor TYPE_ARGUMENTS_PROPERTY = > new ChildListPropertyDescriptor(SuperMethodInvocation.class, "typeArguments", Type.class, NO_CYCLE_RISK); //$NON-NLS-1$ >@@ -74,7 +74,7 @@ > * A list of property descriptors (element type: > * {@link StructuralPropertyDescriptor}), > * or null if uninitialized. >- * @since 3.0 >+ * @since 3.1 > */ > private static final List PROPERTY_DESCRIPTORS_3_0; > >@@ -107,7 +107,7 @@ > * @since 3.0 > */ > public static List propertyDescriptors(int apiLevel) { >- if (apiLevel == AST.JLS2) { >+ if (apiLevel == AST.JLS2_INTERNAL) { > return PROPERTY_DESCRIPTORS_2_0; > } else { > return PROPERTY_DESCRIPTORS_3_0; >@@ -123,7 +123,7 @@ > * The type arguments (element type: <code>Type</code>). > * Null in JLS2. Added in JLS3; defaults to an empty list > * (see constructor). >- * @since 3.0 >+ * @since 3.1 > */ > private ASTNode.NodeList typeArguments = null; > >@@ -277,18 +277,12 @@ > /** > * Returns the live ordered list of type arguments of this method > * invocation (added in JLS3 API). >- * <p> >- * Note: This API element is only needed for dealing with Java code that uses >- * new language features of J2SE 1.5. It is included in anticipation of J2SE >- * 1.5 support, which is planned for the next release of Eclipse after 3.0, and >- * may change slightly before reaching its final form. >- * </p> > * > * @return the live list of type arguments > * (element type: <code>Type</code>) > * @exception UnsupportedOperationException if this operation is used in > * a JLS2 AST >- * @since 3.0 >+ * @since 3.1 > */ > public List typeArguments() { > // more efficient than just calling unsupportedIn2() to check >Index: dom/org/eclipse/jdt/core/dom/Type.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Type.java,v >retrieving revision 1.11 >diff -u -r1.11 Type.java >--- dom/org/eclipse/jdt/core/dom/Type.java 23 Feb 2005 02:47:27 -0000 1.11 >+++ dom/org/eclipse/jdt/core/dom/Type.java 15 Mar 2005 00:39:06 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2004 IBM Corporation and others. >+ * Copyright (c) 2000, 2005 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -105,7 +105,7 @@ > * > * @return <code>true</code> if this is a parameterized type, and > * <code>false</code> otherwise >- * @since 3.0 >+ * @since 3.1 > */ > public final boolean isParameterizedType() { > return (this instanceof ParameterizedType); >@@ -133,7 +133,7 @@ > * > * @return <code>true</code> if this is a qualified type, and > * <code>false</code> otherwise >- * @since 3.0 >+ * @since 3.1 > */ > public final boolean isQualifiedType() { > return (this instanceof QualifiedType); >@@ -149,7 +149,7 @@ > * > * @return <code>true</code> if this is a wildcard type, and > * <code>false</code> otherwise >- * @since 3.0 >+ * @since 3.1 > */ > public final boolean isWildcardType() { > return (this instanceof WildcardType); >Index: dom/org/eclipse/jdt/core/dom/TypeDeclaration.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeDeclaration.java,v >retrieving revision 1.42 >diff -u -r1.42 TypeDeclaration.java >--- dom/org/eclipse/jdt/core/dom/TypeDeclaration.java 23 Feb 2005 02:47:27 -0000 1.42 >+++ dom/org/eclipse/jdt/core/dom/TypeDeclaration.java 15 Mar 2005 00:39:06 -0000 >@@ -78,13 +78,12 @@ > * The "modifiers" structural property of this node type (JLS2 API only). > * @since 3.0 > */ >- // TODO (jeem) When JLS3 support is complete (post 3.0) - deprecated Replaced by {@link #MODIFIERS2_PROPERTY} in the JLS3 API. > public static final SimplePropertyDescriptor MODIFIERS_PROPERTY = > internalModifiersPropertyFactory(TypeDeclaration.class); > > /** > * The "modifiers" structural property of this node type (added in JLS3 API). >- * @since 3.0 >+ * @since 3.1 > */ > public static final ChildListPropertyDescriptor MODIFIERS2_PROPERTY = > internalModifiers2PropertyFactory(TypeDeclaration.class); >@@ -107,7 +106,6 @@ > * The "superclass" structural property of this node type (JLS2 API only). > * @since 3.0 > */ >- // TODO (jeem) When JLS3 support is complete (post 3.0) - deprecated Replaced by {@link #SUPERCLASS_TYPE_PROPERTY} in the JLS3 API. > public static final ChildPropertyDescriptor SUPERCLASS_PROPERTY = > new ChildPropertyDescriptor(TypeDeclaration.class, "superclass", Name.class, OPTIONAL, NO_CYCLE_RISK); //$NON-NLS-1$ > >@@ -115,27 +113,26 @@ > * The "superInterfaces" structural property of this node type (JLS2 API only). > * @since 3.0 > */ >- // TODO (jeem) When JLS3 support is complete (post 3.0) - deprecated Replaced by {@link #SUPER_INTERFACE_TYPES_PROPERTY} in the JLS3 API. > public static final ChildListPropertyDescriptor SUPER_INTERFACES_PROPERTY = > new ChildListPropertyDescriptor(TypeDeclaration.class, "superInterfaces", Name.class, NO_CYCLE_RISK); //$NON-NLS-1$ > > /** > * The "superclassType" structural property of this node type (added in JLS3 API). >- * @since 3.0 >+ * @since 3.1 > */ > public static final ChildPropertyDescriptor SUPERCLASS_TYPE_PROPERTY = > new ChildPropertyDescriptor(TypeDeclaration.class, "superclassType", Type.class, OPTIONAL, NO_CYCLE_RISK); //$NON-NLS-1$ > > /** > * The "superInterfaceTypes" structural property of this node type (added in JLS3 API). >- * @since 3.0 >+ * @since 3.1 > */ > public static final ChildListPropertyDescriptor SUPER_INTERFACE_TYPES_PROPERTY = > new ChildListPropertyDescriptor(TypeDeclaration.class, "superInterfaceTypes", Type.class, NO_CYCLE_RISK); //$NON-NLS-1$ > > /** > * The "typeParameters" structural property of this node type (added in JLS3 API). >- * @since 3.0 >+ * @since 3.1 > */ > public static final ChildListPropertyDescriptor TYPE_PARAMETERS_PROPERTY = > new ChildListPropertyDescriptor(TypeDeclaration.class, "typeParameters", TypeParameter.class, NO_CYCLE_RISK); //$NON-NLS-1$ >@@ -159,7 +156,7 @@ > * A list of property descriptors (element type: > * {@link StructuralPropertyDescriptor}), > * or null if uninitialized. >- * @since 3.0 >+ * @since 3.1 > */ > private static final List PROPERTY_DESCRIPTORS_3_0; > >@@ -200,7 +197,7 @@ > * @since 3.0 > */ > public static List propertyDescriptors(int apiLevel) { >- if (apiLevel == AST.JLS2) { >+ if (apiLevel == AST.JLS2_INTERNAL) { > return PROPERTY_DESCRIPTORS_2_0; > } else { > return PROPERTY_DESCRIPTORS_3_0; >@@ -217,7 +214,7 @@ > * The type paramters (element type: <code>TypeParameter</code>). > * Null in JLS2. Added in JLS3; defaults to an empty list > * (see constructor). >- * @since 3.0 >+ * @since 3.1 > */ > private ASTNode.NodeList typeParameters = null; > >@@ -240,7 +237,7 @@ > * The optional superclass type; <code>null</code> if none. > * Defaults to none. Note that this field is not used for > * interface declarations. Null in JLS2. Added in JLS3. >- * @since 3.0 >+ * @since 3.1 > */ > private Type optionalSuperclassType = null; > >@@ -248,7 +245,7 @@ > * The superinterface types (element type: <code>Type</code>). > * Null in JLS2. Added in JLS3; defaults to an empty list > * (see constructor). >- * @since 3.0 >+ * @since 3.1 > */ > private ASTNode.NodeList superInterfaceTypes = null; > >@@ -268,7 +265,7 @@ > */ > TypeDeclaration(AST ast) { > super(ast); >- if (ast.apiLevel == AST.JLS2) { >+ if (ast.apiLevel == AST.JLS2_INTERNAL) { > this.superInterfaceNames = new ASTNode.NodeList(SUPER_INTERFACES_PROPERTY); > } > if (ast.apiLevel >= AST.JLS3) { >@@ -293,7 +290,7 @@ > if (get) { > return getModifiers(); > } else { >- setModifiers(value); >+ internalSetModifiers(value); > return 0; > } > } >@@ -431,8 +428,8 @@ > result.setSourceRange(this.getStartPosition(), this.getLength()); > result.setJavadoc( > (Javadoc) ASTNode.copySubtree(target, getJavadoc())); >- if (this.ast.apiLevel == AST.JLS2) { >- result.setModifiers(getModifiers()); >+ if (this.ast.apiLevel == AST.JLS2_INTERNAL) { >+ result.internalSetModifiers(getModifiers()); > result.setSuperclass( > (Name) ASTNode.copySubtree(target, getSuperclass())); > result.superInterfaces().addAll( >@@ -469,7 +466,7 @@ > boolean visitChildren = visitor.visit(this); > if (visitChildren) { > // visit children in normal left to right reading order >- if (this.ast.apiLevel == AST.JLS2) { >+ if (this.ast.apiLevel == AST.JLS2_INTERNAL) { > acceptChild(visitor, getJavadoc()); > acceptChild(visitor, getName()); > acceptChild(visitor, getSuperclass()); >@@ -517,18 +514,12 @@ > /** > * Returns the live ordered list of type parameters of this type > * declaration (added in JLS3 API). This list is non-empty for parameterized types. >- * <p> >- * Note: This API element is only needed for dealing with Java code that uses >- * new language features of J2SE 1.5. It is included in anticipation of J2SE >- * 1.5 support, which is planned for the next release of Eclipse after 3.0, and >- * may change slightly before reaching its final form. >- * </p> > * > * @return the live list of type parameters > * (element type: <code>TypeParameter</code>) > * @exception UnsupportedOperationException if this operation is used in > * a JLS2 AST >- * @since 3.0 >+ * @since 3.1 > */ > public List typeParameters() { > // more efficient than just calling unsupportedIn2() to check >@@ -551,10 +542,21 @@ > * there is none > * @exception UnsupportedOperationException if this operation is used in > * an AST later than JLS2 >+ * @deprecated In the JLS3 API, this method is replaced by >+ * {@link #getSuperclassType()}, which returns a <code>Type</code> >+ * instead of a <code>Name</code>. > */ >- // TODO (jeem) When JLS3 support is complete (post 3.0) - deprecated In the JLS3 API, this method is replaced by <code>getSuperclassType</code>, which returns a <code>Type</code> instead of a <code>Name</code>. > public Name getSuperclass() { >- supportedOnlyIn2(); >+ return internalGetSuperclass(); >+ } >+ >+ /** >+ * Internal synonym for deprecated method. Used to avoid >+ * deprecation warnings. >+ * @since 3.1 >+ */ >+ /*package*/ final Name internalGetSuperclass() { >+ supportedOnlyIn2(); > return this.optionalSuperclassName; > } > >@@ -571,7 +573,7 @@ > * there is none > * @exception UnsupportedOperationException if this operation is used in > * a JLS2 AST >- * @since 3.0 >+ * @since 3.1 > */ > public Type getSuperclassType() { > unsupportedIn2(); >@@ -596,9 +598,20 @@ > * </ul> > * @exception UnsupportedOperationException if this operation is used in > * an AST later than JLS2 >+ * @deprecated In the JLS3 API, this method is replaced by >+ * {@link #setSuperclassType(Type)}, which expects a >+ * <code>Type</code> instead of a <code>Name</code>. > */ >- // TODO (jeem) When JLS3 support is complete (post 3.0) - deprecated In the JLS3 API, this method is replaced by <code>setType</code>, which expects a <code>Type</code> instead of a <code>Name</code>. > public void setSuperclass(Name superclassName) { >+ internalSetSuperclass(superclassName); >+ } >+ >+ /** >+ * Internal synonym for deprecated method. Used to avoid >+ * deprecation warnings. >+ * @since 3.1 >+ */ >+ /*package*/ final void internalSetSuperclass(Name superclassName) { > supportedOnlyIn2(); > ASTNode oldChild = this.optionalSuperclassName; > preReplaceChild(oldChild, superclassName, SUPERCLASS_PROPERTY); >@@ -623,7 +636,7 @@ > * </ul> > * @exception UnsupportedOperationException if this operation is used in > * a JLS2 AST >- * @since 3.0 >+ * @since 3.1 > */ > public void setSuperclassType(Type superclassType) { > unsupportedIn2(); >@@ -644,9 +657,19 @@ > * (element type: <code>Name</code>) > * @exception UnsupportedOperationException if this operation is used in > * an AST later than JLS2 >+ * @deprecated In the JLS3 API, this method is replaced by >+ * {@link #superInterfaceTypes()}. > */ >- // TODO (jeem) When JLS3 support is complete (post 3.0) - deprecated In the JLS3 API, this method is replaced by <code>superInterfaceTypes()</code> > public List superInterfaces() { >+ return internalSuperInterfaces(); >+ } >+ >+ /** >+ * Internal synonym for deprecated method. Used to avoid >+ * deprecation warnings. >+ * @since 3.1 >+ */ >+ /*package*/ final List internalSuperInterfaces() { > // more efficient than just calling supportedOnlyIn2() to check > if (this.superInterfaceNames == null) { > supportedOnlyIn2(); >@@ -664,7 +687,7 @@ > * (element type: <code>Type</code>) > * @exception UnsupportedOperationException if this operation is used in > * a JLS2 AST >- * @since 3.0 >+ * @since 3.1 > */ > public List superInterfaceTypes() { > // more efficient than just calling unsupportedIn2() to check >Index: dom/org/eclipse/jdt/core/dom/TypeDeclarationStatement.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeDeclarationStatement.java,v >retrieving revision 1.30 >diff -u -r1.30 TypeDeclarationStatement.java >--- dom/org/eclipse/jdt/core/dom/TypeDeclarationStatement.java 23 Feb 2005 02:47:27 -0000 1.30 >+++ dom/org/eclipse/jdt/core/dom/TypeDeclarationStatement.java 15 Mar 2005 00:39:06 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2004 IBM Corporation and others. >+ * Copyright (c) 2000, 2005 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -43,13 +43,12 @@ > * The "typeDeclaration" structural property of this node type (JLS2 API only). > * @since 3.0 > */ >- // TODO (jeem) When JLS3 support is complete (post 3.0) - deprecated Replaced by {@link #DECLARATION_PROPERTY} in the JLS3 API. > public static final ChildPropertyDescriptor TYPE_DECLARATION_PROPERTY = > new ChildPropertyDescriptor(TypeDeclarationStatement.class, "typeDeclaration", TypeDeclaration.class, MANDATORY, CYCLE_RISK); //$NON-NLS-1$ > > /** > * The "declaration" structural property of this node type (added in JLS3 API). >- * @since 3.0 >+ * @since 3.1 > */ > public static final ChildPropertyDescriptor DECLARATION_PROPERTY = > new ChildPropertyDescriptor(TypeDeclarationStatement.class, "declaration", AbstractTypeDeclaration.class, MANDATORY, CYCLE_RISK); //$NON-NLS-1$ >@@ -66,7 +65,7 @@ > * A list of property descriptors (element type: > * {@link StructuralPropertyDescriptor}), > * or null if uninitialized. >- * @since 3.0 >+ * @since 3.1 > */ > private static final List PROPERTY_DESCRIPTORS_3_0; > >@@ -94,7 +93,7 @@ > * @since 3.0 > */ > public static List propertyDescriptors(int apiLevel) { >- if (apiLevel == AST.JLS2) { >+ if (apiLevel == AST.JLS2_INTERNAL) { > return PROPERTY_DESCRIPTORS_2_0; > } else { > return PROPERTY_DESCRIPTORS_3_0; >@@ -197,7 +196,7 @@ > * statement (added in JLS3 API). > * > * @return the type declaration node >- * @since 3.0 >+ * @since 3.1 > */ > public AbstractTypeDeclaration getDeclaration() { > if (this.typeDecl == null) { >@@ -224,7 +223,7 @@ > * <li>the node already has a parent</li> > * <li>a cycle in would be created</li> > * </ul> >- * @since 3.0 >+ * @since 3.1 > */ > public void setDeclaration(AbstractTypeDeclaration decl) { > if (decl == null) { >@@ -245,10 +244,21 @@ > * @return the type declaration node > * @exception UnsupportedOperationException if this operation is used in > * an AST later than JLS2 >+ * @deprecated In the JLS3 API, this method is replaced by >+ * {@link #getDeclaration()}, which returns <code>AbstractTypeDeclaration</code> >+ * instead of <code>TypeDeclaration</code>. > */ >- // TODO (jeem) When JLS3 support is complete (post 3.0) - deprecated In the JLS3 API, this method is replaced by <code>getDeclaration</code>, which returns <code>AbstractTypeDeclaration</code> instead of <code>TypeDeclaration</code>. > public TypeDeclaration getTypeDeclaration() { >- supportedOnlyIn2(); >+ return internalGetTypeDeclaration(); >+ } >+ >+ /** >+ * Internal synonym for deprecated method. Used to avoid >+ * deprecation warnings. >+ * @since 3.1 >+ */ >+ /*package*/ final TypeDeclaration internalGetTypeDeclaration() { >+ supportedOnlyIn2(); > return (TypeDeclaration) getDeclaration(); > } > >@@ -265,9 +275,21 @@ > * </ul> > * @exception UnsupportedOperationException if this operation is used in > * an AST later than JLS2 >+ * @deprecated In the JLS3 API, this method is replaced by >+ * {@link #setDeclaration(AbstractTypeDeclaration)} which takes >+ * <code>AbstractTypeDeclaration</code> instead of >+ * <code>TypeDeclaration</code>. > */ >- // TODO (jeem) When JLS3 support is complete (post 3.0) - deprecated In the JLS3 API, this method is replaced by <code>setDeclaration</code> which takes <code>AbstractTypeDeclaration</code> instead of <code>TypeDeclaration</code>. > public void setTypeDeclaration(TypeDeclaration decl) { >+ internalSetTypeDeclaration(decl); >+ } >+ >+ /** >+ * Internal synonym for deprecated method. Used to avoid >+ * deprecation warnings. >+ * @since 3.1 >+ */ >+ /*package*/ final void internalSetTypeDeclaration(TypeDeclaration decl) { > supportedOnlyIn2(); > // forward to non-deprecated replacement method > setDeclaration(decl); >Index: dom/org/eclipse/jdt/core/dom/TypeParameter.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeParameter.java,v >retrieving revision 1.19 >diff -u -r1.19 TypeParameter.java >--- dom/org/eclipse/jdt/core/dom/TypeParameter.java 23 Feb 2005 02:47:27 -0000 1.19 >+++ dom/org/eclipse/jdt/core/dom/TypeParameter.java 15 Mar 2005 00:39:06 -0000 >@@ -20,27 +20,19 @@ > * TypeParameter: > * TypeVariable [ <b>extends</b> Type { <b>&</b> Type } ] > * </pre> >- * <p> >- * Note: This API element is only needed for dealing with Java code that uses >- * new language features of J2SE 1.5. It is included in anticipation of J2SE >- * 1.5 support, which is planned for the next release of Eclipse after 3.0, and >- * may change slightly before reaching its final form. >- * </p> > * >- * @since 3.0 >+ * @since 3.1 > */ > public class TypeParameter extends ASTNode { > > /** > * The "name" structural property of this node type. >- * @since 3.0 > */ > public static final ChildPropertyDescriptor NAME_PROPERTY = > new ChildPropertyDescriptor(TypeParameter.class, "name", SimpleName.class, MANDATORY, NO_CYCLE_RISK); //$NON-NLS-1$ > > /** > * The "typeBounds" structural property of this node type. >- * @since 3.0 > */ > public static final ChildListPropertyDescriptor TYPE_BOUNDS_PROPERTY = > new ChildListPropertyDescriptor(TypeParameter.class, "typeBounds", Type.class, NO_CYCLE_RISK); //$NON-NLS-1$ >@@ -69,7 +61,6 @@ > > * @return a list of property descriptors (element type: > * {@link StructuralPropertyDescriptor}) >- * @since 3.0 > */ > public static List propertyDescriptors(int apiLevel) { > return PROPERTY_DESCRIPTORS; >@@ -205,7 +196,6 @@ > * > * @return the binding, or <code>null</code> if the binding cannot be > * resolved >- * @since 3.1 > */ > public final ITypeBinding resolveBinding() { > return this.ast.getBindingResolver().resolveTypeParameter(this); >Index: dom/org/eclipse/jdt/core/dom/VariableDeclarationExpression.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclarationExpression.java,v >retrieving revision 1.32 >diff -u -r1.32 VariableDeclarationExpression.java >--- dom/org/eclipse/jdt/core/dom/VariableDeclarationExpression.java 23 Feb 2005 02:47:27 -0000 1.32 >+++ dom/org/eclipse/jdt/core/dom/VariableDeclarationExpression.java 15 Mar 2005 00:39:06 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2004 IBM Corporation and others. >+ * Copyright (c) 2000, 2005 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -47,13 +47,12 @@ > * The "modifiers" structural property of this node type (JLS2 API only). > * @since 3.0 > */ >- // TODO (jeem) When JLS3 support is complete (post 3.0) - deprecated Replaced by {@link #MODIFIERS2_PROPERTY} in the JLS3 API. > public static final SimplePropertyDescriptor MODIFIERS_PROPERTY = > new SimplePropertyDescriptor(VariableDeclarationExpression.class, "modifiers", int.class, MANDATORY); //$NON-NLS-1$ > > /** > * The "modifiers" structural property of this node type (added in JLS3 API). >- * @since 3.0 >+ * @since 3.1 > */ > public static final ChildListPropertyDescriptor MODIFIERS2_PROPERTY = > new ChildListPropertyDescriptor(VariableDeclarationExpression.class, "modifiers", IExtendedModifier.class, CYCLE_RISK); //$NON-NLS-1$ >@@ -84,7 +83,7 @@ > * A list of property descriptors (element type: > * {@link StructuralPropertyDescriptor}), > * or null if uninitialized. >- * @since 3.0 >+ * @since 3.1 > */ > private static final List PROPERTY_DESCRIPTORS_3_0; > >@@ -116,7 +115,7 @@ > * @since 3.0 > */ > public static List propertyDescriptors(int apiLevel) { >- if (apiLevel == AST.JLS2) { >+ if (apiLevel == AST.JLS2_INTERNAL) { > return PROPERTY_DESCRIPTORS_2_0; > } else { > return PROPERTY_DESCRIPTORS_3_0; >@@ -235,7 +234,7 @@ > VariableDeclarationExpression result = > new VariableDeclarationExpression(target); > result.setSourceRange(this.getStartPosition(), this.getLength()); >- if (this.ast.apiLevel == AST.JLS2) { >+ if (this.ast.apiLevel == AST.JLS2_INTERNAL) { > result.setModifiers(getModifiers()); > } > if (this.ast.apiLevel >= AST.JLS3) { >@@ -279,18 +278,12 @@ > * Note that the final modifier is the only meaningful modifier for local > * variable declarations. > * </p> >- * <p> >- * Note: This API element is only needed for dealing with Java code that uses >- * new language features of J2SE 1.5. It is included in anticipation of J2SE >- * 1.5 support, which is planned for the next release of Eclipse after 3.0, and >- * may change slightly before reaching its final form. >- * </p> > * > * @return the live list of modifiers and annotations > * (element type: <code>IExtendedModifier</code>) > * @exception UnsupportedOperationException if this operation is used in > * a JLS2 AST >- * @since 3.0 >+ * @since 3.1 > */ > public List modifiers() { > // more efficient than just calling unsupportedIn2() to check >@@ -341,12 +334,22 @@ > * @exception UnsupportedOperationException if this operation is used in > * an AST later than JLS2 > * @see Modifier >+ * @deprecated In the JLS3 API, this method is replaced by >+ * {@link #modifiers()} which contains a list of a <code>Modifier</code> nodes. > */ >- // TODO (jeem) When JLS3 support is complete (post 3.0) - deprecated In the JLS3 API, this method is replaced by <code>modifiers()</code> which contains a list of a <code>Modifier</code> nodes. > public void setModifiers(int modifiers) { >+ internalSetModifiers(modifiers); >+ } >+ >+ /** >+ * Internal synonym for deprecated method. Used to avoid >+ * deprecation warnings. >+ * @since 3.1 >+ */ >+ /*package*/ final void internalSetModifiers(int pmodifiers) { > supportedOnlyIn2(); > preValueChange(MODIFIERS_PROPERTY); >- this.modifierFlags = modifiers; >+ this.modifierFlags = pmodifiers; > postValueChange(MODIFIERS_PROPERTY); > } > >Index: dom/org/eclipse/jdt/core/dom/VariableDeclarationStatement.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclarationStatement.java,v >retrieving revision 1.34 >diff -u -r1.34 VariableDeclarationStatement.java >--- dom/org/eclipse/jdt/core/dom/VariableDeclarationStatement.java 23 Feb 2005 02:47:27 -0000 1.34 >+++ dom/org/eclipse/jdt/core/dom/VariableDeclarationStatement.java 15 Mar 2005 00:39:06 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2004 IBM Corporation and others. >+ * Copyright (c) 2000, 2005 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -50,13 +50,12 @@ > * The "modifiers" structural property of this node type (JLS2 API only). > * @since 3.0 > */ >- // TODO (jeem) When JLS3 support is complete (post 3.0) - deprecated Replaced by {@link #MODIFIERS2_PROPERTY} in the JLS3 API. > public static final SimplePropertyDescriptor MODIFIERS_PROPERTY = > new SimplePropertyDescriptor(VariableDeclarationStatement.class, "modifiers", int.class, MANDATORY); //$NON-NLS-1$ > > /** > * The "modifiers" structural property of this node type (added in JLS3 API). >- * @since 3.0 >+ * @since 3.1 > */ > public static final ChildListPropertyDescriptor MODIFIERS2_PROPERTY = > new ChildListPropertyDescriptor(VariableDeclarationStatement.class, "modifiers", IExtendedModifier.class, CYCLE_RISK); //$NON-NLS-1$ >@@ -87,7 +86,7 @@ > * A list of property descriptors (element type: > * {@link StructuralPropertyDescriptor}), > * or null if uninitialized. >- * @since 3.0 >+ * @since 3.1 > */ > private static final List PROPERTY_DESCRIPTORS_3_0; > >@@ -119,7 +118,7 @@ > * @since 3.0 > */ > public static List propertyDescriptors(int apiLevel) { >- if (apiLevel == AST.JLS2) { >+ if (apiLevel == AST.JLS2_INTERNAL) { > return PROPERTY_DESCRIPTORS_2_0; > } else { > return PROPERTY_DESCRIPTORS_3_0; >@@ -130,7 +129,7 @@ > * The extended modifiers (element type: <code>IExtendedModifier</code>). > * Null in JLS2. Added in JLS3; defaults to an empty list > * (see constructor). >- * @since 3.0 >+ * @since 3.1 > */ > private ASTNode.NodeList modifiers = null; > >@@ -239,7 +238,7 @@ > new VariableDeclarationStatement(target); > result.setSourceRange(this.getStartPosition(), this.getLength()); > result.copyLeadingComment(this); >- if (this.ast.apiLevel == AST.JLS2) { >+ if (this.ast.apiLevel == AST.JLS2_INTERNAL) { > result.setModifiers(getModifiers()); > } > if (this.ast.apiLevel >= AST.JLS3) { >@@ -287,7 +286,7 @@ > * (element type: <code>IExtendedModifier</code>) > * @exception UnsupportedOperationException if this operation is used in > * a JLS2 AST >- * @since 3.0 >+ * @since 3.1 > */ > public List modifiers() { > // more efficient than just calling unsupportedIn2() to check >@@ -338,12 +337,22 @@ > * @exception UnsupportedOperationException if this operation is used in > * an AST later than JLS2 > * @see Modifier >+ * @deprecated In the JLS3 API, this method is replaced by >+ * {@link #modifiers()} which contains a list of a <code>Modifier</code> nodes. > */ >- // TODO (jeem) When JLS3 support is complete (post 3.0) - deprecated In the JLS3 API, this method is replaced by <code>modifiers()</code> which contains a list of a <code>Modifier</code> nodes. > public void setModifiers(int modifiers) { >+ internalSetModifiers(modifiers); >+ } >+ >+ /** >+ * Internal synonym for deprecated method. Used to avoid >+ * deprecation warnings. >+ * @since 3.1 >+ */ >+ /*package*/ final void internalSetModifiers(int pmodifiers) { > supportedOnlyIn2(); > preValueChange(MODIFIERS_PROPERTY); >- this.modifierFlags = modifiers; >+ this.modifierFlags = pmodifiers; > postValueChange(MODIFIERS_PROPERTY); > } > >Index: dom/org/eclipse/jdt/core/dom/WildcardType.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/WildcardType.java,v >retrieving revision 1.14 >diff -u -r1.14 WildcardType.java >--- dom/org/eclipse/jdt/core/dom/WildcardType.java 23 Feb 2005 02:47:27 -0000 1.14 >+++ dom/org/eclipse/jdt/core/dom/WildcardType.java 15 Mar 2005 00:39:07 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2003, 2004 IBM Corporation and others. >+ * Copyright (c) 2003, 2005 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -25,27 +25,19 @@ > * it is nonsense if a wildcard type node appears anywhere other than as an > * argument of a <code>ParameterizedType</code> node. > * </p> >- * <p> >- * Note: This API element is only needed for dealing with Java code that uses >- * new language features of J2SE 1.5. It is included in anticipation of J2SE >- * 1.5 support, which is planned for the next release of Eclipse after 3.0, and >- * may change slightly before reaching its final form. >- * </p> > * >- * @since 3.0 >+ * @since 3.1 > */ > public class WildcardType extends Type { > > /** > * The "bound" structural property of this node type. >- * @since 3.0 > */ > public static final ChildPropertyDescriptor BOUND_PROPERTY = > new ChildPropertyDescriptor(WildcardType.class, "bound", Type.class, OPTIONAL, CYCLE_RISK); //$NON-NLS-1$ > > /** > * The "upperBound" structural property of this node type. >- * @since 3.0 > */ > public static final SimplePropertyDescriptor UPPER_BOUND_PROPERTY = > new SimplePropertyDescriptor(WildcardType.class, "upperBound", boolean.class, MANDATORY); //$NON-NLS-1$ >@@ -74,7 +66,6 @@ > > * @return a list of property descriptors (element type: > * {@link StructuralPropertyDescriptor}) >- * @since 3.0 > */ > public static List propertyDescriptors(int apiLevel) { > return PROPERTY_DESCRIPTORS; >Index: dom/org/eclipse/jdt/core/dom/rewrite/ASTRewrite.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/rewrite/ASTRewrite.java,v >retrieving revision 1.17 >diff -u -r1.17 ASTRewrite.java >--- dom/org/eclipse/jdt/core/dom/rewrite/ASTRewrite.java 23 Feb 2005 02:47:58 -0000 1.17 >+++ dom/org/eclipse/jdt/core/dom/rewrite/ASTRewrite.java 15 Mar 2005 00:39:07 -0000 >@@ -51,7 +51,7 @@ > * </p> > * <pre> > * Document doc = new Document("import java.util.List;\nclass X {}\n"); >- * ASTParser parser = ASTParser.newParser(AST.JLS2); >+ * ASTParser parser = ASTParser.newParser(AST.JLS3); > * parser.setSource(doc.get().toCharArray()); > * CompilationUnit cu = (CompilationUnit) parser.createAST(null); > * AST ast = cu.getAST(); >Index: dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteAnalyzer.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteAnalyzer.java,v >retrieving revision 1.23 >diff -u -r1.23 ASTRewriteAnalyzer.java >--- dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteAnalyzer.java 14 Mar 2005 12:05:40 -0000 1.23 >+++ dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteAnalyzer.java 15 Mar 2005 00:39:07 -0000 >@@ -63,6 +63,13 @@ > */ > public final class ASTRewriteAnalyzer extends ASTVisitor { > >+ /** >+ * Internal synonynm for deprecated constant AST.JLS2 >+ * to alleviate deprecation warnings. >+ * @deprecated >+ */ >+ /*package*/ static final int JLS2_INTERNAL = AST.JLS2; >+ > TextEdit currentEdit; > final RewriteEventStore eventStore; // used from inner classes > >@@ -1329,7 +1336,7 @@ > > int pos= rewriteJavadoc(node, TypeDeclaration.JAVADOC_PROPERTY); > >- if (apiLevel == AST.JLS2) { >+ if (apiLevel == JLS2_INTERNAL) { > rewriteModifiers(node, TypeDeclaration.MODIFIERS_PROPERTY, pos); > } else { > rewriteModifiers2(node, TypeDeclaration.MODIFIERS2_PROPERTY, pos); >@@ -1362,7 +1369,7 @@ > > // superclass > if (!isInterface || invertType) { >- ChildPropertyDescriptor superClassProperty= (apiLevel == AST.JLS2) ? TypeDeclaration.SUPERCLASS_PROPERTY : TypeDeclaration.SUPERCLASS_TYPE_PROPERTY; >+ ChildPropertyDescriptor superClassProperty= (apiLevel == JLS2_INTERNAL) ? TypeDeclaration.SUPERCLASS_PROPERTY : TypeDeclaration.SUPERCLASS_TYPE_PROPERTY; > > RewriteEvent superClassEvent= getEvent(node, superClassProperty); > >@@ -1396,7 +1403,7 @@ > } > } > // extended interfaces >- ChildListPropertyDescriptor superInterfaceProperty= (apiLevel == AST.JLS2) ? TypeDeclaration.SUPER_INTERFACES_PROPERTY : TypeDeclaration.SUPER_INTERFACE_TYPES_PROPERTY; >+ ChildListPropertyDescriptor superInterfaceProperty= (apiLevel == JLS2_INTERNAL) ? TypeDeclaration.SUPER_INTERFACES_PROPERTY : TypeDeclaration.SUPER_INTERFACE_TYPES_PROPERTY; > > RewriteEvent interfaceEvent= getEvent(node, superInterfaceProperty); > if (interfaceEvent == null || interfaceEvent.getChangeKind() == RewriteEvent.UNCHANGED) { >@@ -1436,7 +1443,7 @@ > } > > private void rewriteReturnType(MethodDeclaration node, boolean isConstructor, boolean isConstructorChange) { >- ChildPropertyDescriptor property= (node.getAST().apiLevel() == AST.JLS2) ? MethodDeclaration.RETURN_TYPE_PROPERTY : MethodDeclaration.RETURN_TYPE2_PROPERTY; >+ ChildPropertyDescriptor property= (node.getAST().apiLevel() == JLS2_INTERNAL) ? MethodDeclaration.RETURN_TYPE_PROPERTY : MethodDeclaration.RETURN_TYPE2_PROPERTY; > > // weakness in the AST: return type can exist, even if missing in source > ASTNode originalReturnType= (ASTNode) getOriginalValue(node, property); >@@ -1471,7 +1478,7 @@ > return doVisitUnchangedChildren(node); > } > int pos= rewriteJavadoc(node, MethodDeclaration.JAVADOC_PROPERTY); >- if (node.getAST().apiLevel() == AST.JLS2) { >+ if (node.getAST().apiLevel() == JLS2_INTERNAL) { > rewriteModifiers(node, MethodDeclaration.MODIFIERS_PROPERTY, pos); > } else { > pos= rewriteModifiers2(node, MethodDeclaration.MODIFIERS2_PROPERTY, pos); >@@ -1829,7 +1836,7 @@ > } > > int pos= rewriteOptionalQualifier(node, ClassInstanceCreation.EXPRESSION_PROPERTY, node.getStartPosition()); >- if (node.getAST().apiLevel() == AST.JLS2) { >+ if (node.getAST().apiLevel() == JLS2_INTERNAL) { > pos= rewriteRequiredNode(node, ClassInstanceCreation.NAME_PROPERTY); > } else { > if (isChanged(node, ClassInstanceCreation.TYPE_ARGUMENTS_PROPERTY)) { >@@ -1995,7 +2002,7 @@ > } > int pos= rewriteJavadoc(node, FieldDeclaration.JAVADOC_PROPERTY); > >- if (node.getAST().apiLevel() == AST.JLS2) { >+ if (node.getAST().apiLevel() == JLS2_INTERNAL) { > rewriteModifiers(node, FieldDeclaration.MODIFIERS_PROPERTY, pos); > } else { > rewriteModifiers2(node, FieldDeclaration.MODIFIERS2_PROPERTY, pos); >@@ -2208,7 +2215,7 @@ > return doVisitUnchangedChildren(node); > } > int pos= rewriteJavadoc(node, Initializer.JAVADOC_PROPERTY); >- if (node.getAST().apiLevel() == AST.JLS2) { >+ if (node.getAST().apiLevel() == JLS2_INTERNAL) { > rewriteModifiers(node, Initializer.MODIFIERS_PROPERTY, pos); > } else { > rewriteModifiers2(node, Initializer.MODIFIERS2_PROPERTY, pos); >@@ -2424,7 +2431,7 @@ > return doVisitUnchangedChildren(node); > } > int pos= node.getStartPosition(); >- if (node.getAST().apiLevel() == AST.JLS2) { >+ if (node.getAST().apiLevel() == JLS2_INTERNAL) { > rewriteModifiers(node, SingleVariableDeclaration.MODIFIERS_PROPERTY, pos); > } else { > rewriteModifiers2(node, SingleVariableDeclaration.MODIFIERS2_PROPERTY, pos); >@@ -2686,7 +2693,7 @@ > if (!hasChildrenChanges(node)) { > return doVisitUnchangedChildren(node); > } >- if (node.getAST().apiLevel() == AST.JLS2) { >+ if (node.getAST().apiLevel() == JLS2_INTERNAL) { > rewriteRequiredNode(node, TypeDeclarationStatement.TYPE_DECLARATION_PROPERTY); > } else { > rewriteRequiredNode(node, TypeDeclarationStatement.DECLARATION_PROPERTY); >@@ -2716,7 +2723,7 @@ > > // same code as FieldDeclaration > int pos= node.getStartPosition(); >- if (node.getAST().apiLevel() == AST.JLS2) { >+ if (node.getAST().apiLevel() == JLS2_INTERNAL) { > rewriteModifiers(node, VariableDeclarationExpression.MODIFIERS_PROPERTY, pos); > } else { > rewriteModifiers2(node, VariableDeclarationExpression.MODIFIERS2_PROPERTY, pos); >@@ -2764,7 +2771,7 @@ > > // same code as FieldDeclaration > int pos= node.getStartPosition(); >- if (node.getAST().apiLevel() == AST.JLS2) { >+ if (node.getAST().apiLevel() == JLS2_INTERNAL) { > rewriteModifiers(node, VariableDeclarationStatement.MODIFIERS_PROPERTY, pos); > } else { > rewriteModifiers2(node, VariableDeclarationStatement.MODIFIERS2_PROPERTY, pos); >Index: dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFlattener.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFlattener.java,v >retrieving revision 1.11 >diff -u -r1.11 ASTRewriteFlattener.java >--- dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFlattener.java 14 Mar 2005 12:05:40 -0000 1.11 >+++ dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFlattener.java 15 Mar 2005 00:39:07 -0000 >@@ -16,6 +16,13 @@ > > public class ASTRewriteFlattener extends ASTVisitor { > >+ /** >+ * Internal synonynm for deprecated constant AST.JSL2 >+ * to alleviate deprecation warnings. >+ * @deprecated >+ */ >+ /*package*/ static final int JLS2_INTERNAL = AST.JLS2; >+ > public static String asString(ASTNode node, RewriteEventStore store) { > ASTRewriteFlattener flattener= new ASTRewriteFlattener(store); > node.accept(flattener); >@@ -315,7 +322,7 @@ > this.result.append('.'); > } > this.result.append("new ");//$NON-NLS-1$ >- if (node.getAST().apiLevel() == AST.JLS2) { >+ if (node.getAST().apiLevel() == JLS2_INTERNAL) { > getChildNode(node, ClassInstanceCreation.NAME_PROPERTY).accept(this); > } else { > visitList(node, ClassInstanceCreation.TYPE_ARGUMENTS_PROPERTY, String.valueOf(','), String.valueOf('<'), String.valueOf('>')); >@@ -431,7 +438,7 @@ > if (javadoc != null) { > javadoc.accept(this); > } >- if (node.getAST().apiLevel() == AST.JLS2) { >+ if (node.getAST().apiLevel() == JLS2_INTERNAL) { > printModifiers(getIntAttribute(node, FieldDeclaration.MODIFIERS_PROPERTY), this.result); > } else { > visitList(node, FieldDeclaration.MODIFIERS2_PROPERTY, String.valueOf(' '), EMPTY, String.valueOf(' ')); >@@ -535,7 +542,7 @@ > if (javadoc != null) { > javadoc.accept(this); > } >- if (node.getAST().apiLevel() == AST.JLS2) { >+ if (node.getAST().apiLevel() == JLS2_INTERNAL) { > printModifiers(getIntAttribute(node, Initializer.MODIFIERS_PROPERTY), this.result); > } else { > visitList(node, Initializer.MODIFIERS2_PROPERTY, String.valueOf(' '), EMPTY, String.valueOf(' ')); >@@ -576,7 +583,7 @@ > if (javadoc != null) { > javadoc.accept(this); > } >- if (node.getAST().apiLevel() == AST.JLS2) { >+ if (node.getAST().apiLevel() == JLS2_INTERNAL) { > printModifiers(getIntAttribute(node, MethodDeclaration.MODIFIERS_PROPERTY), this.result); > } else { > visitList(node, MethodDeclaration.MODIFIERS2_PROPERTY, String.valueOf(' '), EMPTY, String.valueOf(' ')); >@@ -584,7 +591,7 @@ > } > > if (!getBooleanAttribute(node, MethodDeclaration.CONSTRUCTOR_PROPERTY)) { >- if (node.getAST().apiLevel() == AST.JLS2) { >+ if (node.getAST().apiLevel() == JLS2_INTERNAL) { > getChildNode(node, MethodDeclaration.RETURN_TYPE_PROPERTY).accept(this); > } else { > ASTNode returnType = getChildNode(node, MethodDeclaration.RETURN_TYPE2_PROPERTY); >@@ -747,7 +754,7 @@ > * @see ASTVisitor#visit(SingleVariableDeclaration) > */ > public boolean visit(SingleVariableDeclaration node) { >- if (node.getAST().apiLevel() == AST.JLS2) { >+ if (node.getAST().apiLevel() == JLS2_INTERNAL) { > printModifiers(getIntAttribute(node, SingleVariableDeclaration.MODIFIERS_PROPERTY), this.result); > } else { > visitList(node, SingleVariableDeclaration.MODIFIERS2_PROPERTY, String.valueOf(' '), EMPTY, String.valueOf(' ')); >@@ -921,7 +928,7 @@ > javadoc.accept(this); > } > >- if (apiLevel == AST.JLS2) { >+ if (apiLevel == JLS2_INTERNAL) { > printModifiers(getIntAttribute(node, TypeDeclaration.MODIFIERS_PROPERTY), this.result); > } else { > visitList(node, TypeDeclaration.MODIFIERS2_PROPERTY, String.valueOf(' '), EMPTY, String.valueOf(' ')); >@@ -936,7 +943,7 @@ > > this.result.append(' '); > >- ChildPropertyDescriptor superClassProperty= (apiLevel == AST.JLS2) ? TypeDeclaration.SUPERCLASS_PROPERTY : TypeDeclaration.SUPERCLASS_TYPE_PROPERTY; >+ ChildPropertyDescriptor superClassProperty= (apiLevel == JLS2_INTERNAL) ? TypeDeclaration.SUPERCLASS_PROPERTY : TypeDeclaration.SUPERCLASS_TYPE_PROPERTY; > ASTNode superclass= getChildNode(node, superClassProperty); > if (superclass != null) { > this.result.append("extends "); //$NON-NLS-1$ >@@ -944,7 +951,7 @@ > this.result.append(' '); > } > >- ChildListPropertyDescriptor superInterfaceProperty= (apiLevel == AST.JLS2) ? TypeDeclaration.SUPER_INTERFACES_PROPERTY : TypeDeclaration.SUPER_INTERFACE_TYPES_PROPERTY; >+ ChildListPropertyDescriptor superInterfaceProperty= (apiLevel == JLS2_INTERNAL) ? TypeDeclaration.SUPER_INTERFACES_PROPERTY : TypeDeclaration.SUPER_INTERFACE_TYPES_PROPERTY; > String lead= isInterface ? "extends " : "implements "; //$NON-NLS-1$//$NON-NLS-2$ > visitList(node, superInterfaceProperty, String.valueOf(','), lead, EMPTY); > this.result.append('{'); >@@ -957,7 +964,7 @@ > * @see ASTVisitor#visit(TypeDeclarationStatement) > */ > public boolean visit(TypeDeclarationStatement node) { >- if (node.getAST().apiLevel() == AST.JLS2) { >+ if (node.getAST().apiLevel() == JLS2_INTERNAL) { > getChildNode(node, TypeDeclarationStatement.TYPE_DECLARATION_PROPERTY).accept(this); > } else { > getChildNode(node, TypeDeclarationStatement.DECLARATION_PROPERTY).accept(this); >@@ -978,7 +985,7 @@ > * @see ASTVisitor#visit(VariableDeclarationExpression) > */ > public boolean visit(VariableDeclarationExpression node) { >- if (node.getAST().apiLevel() == AST.JLS2) { >+ if (node.getAST().apiLevel() == JLS2_INTERNAL) { > printModifiers(getIntAttribute(node, VariableDeclarationExpression.MODIFIERS_PROPERTY), this.result); > } else { > visitList(node, VariableDeclarationExpression.MODIFIERS2_PROPERTY, String.valueOf(' '), EMPTY, String.valueOf(' ')); >@@ -1010,7 +1017,7 @@ > * @see ASTVisitor#visit(VariableDeclarationStatement) > */ > public boolean visit(VariableDeclarationStatement node) { >- if (node.getAST().apiLevel() == AST.JLS2) { >+ if (node.getAST().apiLevel() == JLS2_INTERNAL) { > printModifiers(getIntAttribute(node, VariableDeclarationStatement.MODIFIERS_PROPERTY), this.result); > } else { > visitList(node, VariableDeclarationStatement.MODIFIERS2_PROPERTY, String.valueOf(' '), EMPTY, String.valueOf(' '));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 69657
: 18782