aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core/src
diff options
context:
space:
mode:
authorAlexander Kriegisch <Alexander@Kriegisch.name>2021-10-08 06:36:38 +0200
committerAlexander Kriegisch <Alexander@Kriegisch.name>2021-10-08 06:36:38 +0200
commit1dd6a2d47cb409e6f932728e58b41d15c3cf980c (patch)
treee45d2e35e2fa1cd81b6cee6b1a4dad1989f59f29 /org.aspectj.ajdt.core/src
parentd9c96991b813b0a95a950e51e8f6149b9cae5ed7 (diff)
downloadaspectj-1dd6a2d47cb409e6f932728e58b41d15c3cf980c.tar.gz
aspectj-1dd6a2d47cb409e6f932728e58b41d15c3cf980c.zip
Rename DOM AST class TypePattern to AbstractTypePattern
Since JDT Core 3.27 (Java 17), there is a name clash, because the new class org.eclipse.jdt.core.dom.TypePattern (JEP 406) gets relocated to org.aspectj.org.eclipse.jdt.core.dom.TypePattern during shading. Fortunately, this made tests like AjASTTest and AjAST5Test fail with rather nasty errors like: java.lang.VerifyError: Bad return type (...) Type 'org/aspectj/org/eclipse/jdt/core/dom/TypePattern' (...) is not assignable to 'org/aspectj/org/eclipse/jdt/core/dom/Pattern' (...) TODO: Update AJDT references to the renamed class in the following classes after refreshing the AspectJ sources: - ExtraPackageReferenceFinder - ExtraTypeReferenceFinder This also means, that for Eclipse 2021-09 (4.21) we need a new AJDT update site, because simply deploying to the 4.19 one would probably lead to problems in the IDE. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Diffstat (limited to 'org.aspectj.ajdt.core/src')
-rw-r--r--org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/AbstractBooleanTypePattern.java14
-rw-r--r--org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/AbstractTypePattern.java (renamed from org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/TypePattern.java)6
-rw-r--r--org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java18
-rw-r--r--org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/AjNaiveASTFlattener.java4
-rw-r--r--org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/AndTypePattern.java4
-rw-r--r--org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/AnyTypePattern.java2
-rw-r--r--org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/AnyWithAnnotationTypePattern.java2
-rw-r--r--org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/DeclareParentsDeclaration.java14
-rw-r--r--org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/DeclarePrecedenceDeclaration.java2
-rw-r--r--org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/DeclareSoftDeclaration.java12
-rw-r--r--org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/DefaultTypePattern.java2
-rw-r--r--org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/EllipsisTypePattern.java2
-rw-r--r--org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/HasMemberTypePattern.java2
-rw-r--r--org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/IdentifierTypePattern.java2
-rw-r--r--org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/NoTypePattern.java2
-rw-r--r--org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/NotTypePattern.java10
-rw-r--r--org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/OrTypePattern.java6
-rw-r--r--org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/TypeCategoryTypePattern.java2
-rw-r--r--org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/AjAST5Test.java5
-rw-r--r--org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/AjASTTest.java8
20 files changed, 59 insertions, 60 deletions
diff --git a/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/AbstractBooleanTypePattern.java b/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/AbstractBooleanTypePattern.java
index 4163210cb..045e7fd2d 100644
--- a/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/AbstractBooleanTypePattern.java
+++ b/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/AbstractBooleanTypePattern.java
@@ -9,23 +9,23 @@
*******************************************************************/
package org.aspectj.org.eclipse.jdt.core.dom;
-public abstract class AbstractBooleanTypePattern extends TypePattern {
+public abstract class AbstractBooleanTypePattern extends AbstractTypePattern {
- private TypePattern left;
- private TypePattern right;
+ private AbstractTypePattern left;
+ private AbstractTypePattern right;
- AbstractBooleanTypePattern(AST ast, TypePattern left, TypePattern right,
- String booleanOperator) {
+ AbstractBooleanTypePattern(AST ast, AbstractTypePattern left, AbstractTypePattern right,
+ String booleanOperator) {
super(ast, booleanOperator);
this.left = left;
this.right = right;
}
- public TypePattern getLeft() {
+ public AbstractTypePattern getLeft() {
return left;
}
- public TypePattern getRight() {
+ public AbstractTypePattern getRight() {
return right;
}
diff --git a/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/TypePattern.java b/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/AbstractTypePattern.java
index d296dbef3..cff152fa7 100644
--- a/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/TypePattern.java
+++ b/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/AbstractTypePattern.java
@@ -14,17 +14,17 @@ package org.aspectj.org.eclipse.jdt.core.dom;
/**
* abstract TypePattern DOM AST node.
*/
-public abstract class TypePattern extends PatternNode {
+public abstract class AbstractTypePattern extends PatternNode {
private String typePatternExpression;
public static final String EMPTY_EXPRESSION = "";
- TypePattern(AST ast) {
+ AbstractTypePattern(AST ast) {
super(ast);
}
- TypePattern(AST ast, String typePatternExpression) {
+ AbstractTypePattern(AST ast, String typePatternExpression) {
super(ast);
this.typePatternExpression = typePatternExpression;
}
diff --git a/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java b/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
index 02ca4544f..64bb9cefe 100644
--- a/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
+++ b/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java
@@ -659,9 +659,9 @@ public class AjASTConverter extends ASTConverter {
DeclareParents dp = (DeclareParents) declare;
declareDeclaration = new org.aspectj.org.eclipse.jdt.core.dom.DeclareParentsDeclaration(this.ast, dp.isExtends());
org.aspectj.org.eclipse.jdt.core.dom.PatternNode pNode = convert(dp.getChild());
- if (pNode instanceof org.aspectj.org.eclipse.jdt.core.dom.TypePattern) {
+ if (pNode instanceof AbstractTypePattern) {
((DeclareParentsDeclaration) declareDeclaration)
- .setChildTypePattern((org.aspectj.org.eclipse.jdt.core.dom.TypePattern) pNode);
+ .setChildTypePattern((AbstractTypePattern) pNode);
}
TypePattern[] weaverTypePatterns = dp.getParents().getTypePatterns();
List typePatterns = ((DeclareParentsDeclaration) declareDeclaration).parentTypePatterns();
@@ -681,9 +681,9 @@ public class AjASTConverter extends ASTConverter {
DeclareSoft ds = (DeclareSoft) declare;
((DeclareSoftDeclaration) declareDeclaration).setPointcut(convert(ds.getPointcut()));
org.aspectj.org.eclipse.jdt.core.dom.PatternNode pNode = convert(ds.getException());
- if (pNode instanceof org.aspectj.org.eclipse.jdt.core.dom.TypePattern) {
+ if (pNode instanceof AbstractTypePattern) {
((DeclareSoftDeclaration) declareDeclaration)
- .setTypePattern((org.aspectj.org.eclipse.jdt.core.dom.TypePattern) pNode);
+ .setTypePattern((AbstractTypePattern) pNode);
}
}
@@ -866,12 +866,12 @@ public class AjASTConverter extends ASTConverter {
}
- public org.aspectj.org.eclipse.jdt.core.dom.TypePattern convert(
+ public AbstractTypePattern convert(
TypePattern weaverNode) {
// First check if the node is a Java type (WildType, ExactType,
// BindingType)
- org.aspectj.org.eclipse.jdt.core.dom.TypePattern domNode = createIdentifierTypePattern(weaverNode);
+ AbstractTypePattern domNode = createIdentifierTypePattern(weaverNode);
if (domNode == null) {
if (weaverNode instanceof org.aspectj.weaver.patterns.EllipsisTypePattern) {
@@ -907,7 +907,7 @@ public class AjASTConverter extends ASTConverter {
// nottypepattern is 1, NOT 0.
TypePattern negatedTypePattern = ((org.aspectj.weaver.patterns.NotTypePattern) weaverNode)
.getNegatedPattern();
- org.aspectj.org.eclipse.jdt.core.dom.TypePattern negatedDomTypePattern = convert(negatedTypePattern);
+ AbstractTypePattern negatedDomTypePattern = convert(negatedTypePattern);
domNode = new org.aspectj.org.eclipse.jdt.core.dom.NotTypePattern(
ast, negatedDomTypePattern);
} else if (weaverNode instanceof org.aspectj.weaver.patterns.TypeCategoryTypePattern) {
@@ -945,11 +945,11 @@ public class AjASTConverter extends ASTConverter {
* to convert to a DOM equivalent
* @return DOM node or null if it was not created
*/
- protected org.aspectj.org.eclipse.jdt.core.dom.TypePattern createIdentifierTypePattern(
+ protected AbstractTypePattern createIdentifierTypePattern(
TypePattern weaverTypePattern) {
String typeExpression = weaverTypePattern.toString();
- org.aspectj.org.eclipse.jdt.core.dom.TypePattern domTypePattern = null;
+ AbstractTypePattern domTypePattern = null;
if (weaverTypePattern instanceof org.aspectj.weaver.patterns.WildTypePattern) {
// Use the expression for wild type patterns as a Name may not be
// constructed
diff --git a/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/AjNaiveASTFlattener.java b/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/AjNaiveASTFlattener.java
index 36f95a109..dd5511fc9 100644
--- a/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/AjNaiveASTFlattener.java
+++ b/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/AjNaiveASTFlattener.java
@@ -1661,7 +1661,7 @@ public class AjNaiveASTFlattener extends AjASTVisitor {
}
for (Iterator it = node.parentTypePatterns().iterator(); it.hasNext();) {
- TypePattern typePat = (TypePattern) it.next();
+ AbstractTypePattern typePat = (AbstractTypePattern) it.next();
typePat.accept(this);
if(it.hasNext()){
this.buffer.append(", ");
@@ -1711,7 +1711,7 @@ public class AjNaiveASTFlattener extends AjASTVisitor {
this.buffer.append("declare precedence: ");
for (Iterator it = node.typePatterns().iterator(); it.hasNext();) {
- TypePattern typePat = (TypePattern) it.next();
+ AbstractTypePattern typePat = (AbstractTypePattern) it.next();
typePat.accept(this);
if(it.hasNext()){
this.buffer.append(", ");
diff --git a/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/AndTypePattern.java b/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/AndTypePattern.java
index 87d96868d..84ab558a7 100644
--- a/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/AndTypePattern.java
+++ b/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/AndTypePattern.java
@@ -15,7 +15,7 @@ public class AndTypePattern extends AbstractBooleanTypePattern {
public static final String AND_OPERATOR = "&&";
- AndTypePattern(AST ast, TypePattern left, TypePattern right) {
+ AndTypePattern(AST ast, AbstractTypePattern left, AbstractTypePattern right) {
super(ast, left, right, AND_OPERATOR);
}
@@ -25,7 +25,7 @@ public class AndTypePattern extends AbstractBooleanTypePattern {
ASTNode clone0(AST target) {
AndTypePattern cloned = new AndTypePattern(target,
- (TypePattern) getLeft().clone(target), (TypePattern) getRight()
+ (AbstractTypePattern) getLeft().clone(target), (AbstractTypePattern) getRight()
.clone(target));
cloned.setSourceRange(getStartPosition(), getLength());
return cloned;
diff --git a/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/AnyTypePattern.java b/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/AnyTypePattern.java
index b2355da3c..4d327e33d 100644
--- a/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/AnyTypePattern.java
+++ b/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/AnyTypePattern.java
@@ -11,7 +11,7 @@ package org.aspectj.org.eclipse.jdt.core.dom;
import java.util.List;
-public class AnyTypePattern extends TypePattern {
+public class AnyTypePattern extends AbstractTypePattern {
public static final String ANYTYPE_DETAIL = "*";
diff --git a/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/AnyWithAnnotationTypePattern.java b/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/AnyWithAnnotationTypePattern.java
index 678537df5..e9a8adcda 100644
--- a/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/AnyWithAnnotationTypePattern.java
+++ b/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/AnyWithAnnotationTypePattern.java
@@ -16,7 +16,7 @@ import java.util.List;
* expression
*
*/
-public class AnyWithAnnotationTypePattern extends TypePattern {
+public class AnyWithAnnotationTypePattern extends AbstractTypePattern {
AnyWithAnnotationTypePattern(AST ast, String annotationExpression) {
// Is this correct? should the "*" be added
diff --git a/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/DeclareParentsDeclaration.java b/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/DeclareParentsDeclaration.java
index 3443fb5a9..7ba035ad7 100644
--- a/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/DeclareParentsDeclaration.java
+++ b/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/DeclareParentsDeclaration.java
@@ -27,13 +27,13 @@ public class DeclareParentsDeclaration extends DeclareDeclaration {
internalJavadocPropertyFactory(DeclareParentsDeclaration.class);
public static final ChildPropertyDescriptor CHILD_TYPE_PATTERN_PROPERTY =
- new ChildPropertyDescriptor(DeclareParentsDeclaration.class, "childTypePattern", TypePattern.class, MANDATORY, NO_CYCLE_RISK); //$NON-NLS-1$
+ new ChildPropertyDescriptor(DeclareParentsDeclaration.class, "childTypePattern", AbstractTypePattern.class, MANDATORY, NO_CYCLE_RISK); //$NON-NLS-1$
public static final SimplePropertyDescriptor IS_EXTENDS_PROPERTY =
new SimplePropertyDescriptor(DeclareParentsDeclaration.class, "isExtends", boolean.class, MANDATORY); //$NON-NLS-1$
public static final ChildListPropertyDescriptor PARENTS_TYPE_PATTERNS_LIST_PROPERTY =
- new ChildListPropertyDescriptor(DeclareParentsDeclaration.class, "typePatternsList", TypePattern.class, NO_CYCLE_RISK); //$NON-NLS-1$
+ new ChildListPropertyDescriptor(DeclareParentsDeclaration.class, "typePatternsList", AbstractTypePattern.class, NO_CYCLE_RISK); //$NON-NLS-1$
private static final List PROPERTY_DESCRIPTORS_2_0;
private static final List PROPERTY_DESCRIPTORS_3_0;
@@ -57,7 +57,7 @@ public class DeclareParentsDeclaration extends DeclareDeclaration {
}
private boolean isExtends;
- private TypePattern childTypePattern;
+ private AbstractTypePattern childTypePattern;
protected ASTNode.NodeList parentTypePatterns =new ASTNode.NodeList(PARENTS_TYPE_PATTERNS_LIST_PROPERTY);
@@ -76,7 +76,7 @@ public class DeclareParentsDeclaration extends DeclareDeclaration {
result.setJavadoc(
(Javadoc) ASTNode.copySubtree(target, getJavadoc()));
result.setChildTypePattern(
- (TypePattern) ASTNode.copySubtree(target, getChildTypePattern()));
+ (AbstractTypePattern) ASTNode.copySubtree(target, getChildTypePattern()));
result.setExtends(isExtends());
result.parentTypePatterns().addAll(
ASTNode.copySubtrees(target, parentTypePatterns()));
@@ -172,7 +172,7 @@ public class DeclareParentsDeclaration extends DeclareDeclaration {
if (get) {
return getChildTypePattern();
} else {
- setChildTypePattern((TypePattern) child);
+ setChildTypePattern((AbstractTypePattern) child);
return null;
}
}
@@ -218,11 +218,11 @@ public class DeclareParentsDeclaration extends DeclareDeclaration {
}
- public TypePattern getChildTypePattern(){
+ public AbstractTypePattern getChildTypePattern(){
return childTypePattern;
}
- public void setChildTypePattern(TypePattern typePattern) {
+ public void setChildTypePattern(AbstractTypePattern typePattern) {
if (typePattern == null) {
throw new IllegalArgumentException();
}
diff --git a/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/DeclarePrecedenceDeclaration.java b/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/DeclarePrecedenceDeclaration.java
index 1b50f431e..0b614a010 100644
--- a/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/DeclarePrecedenceDeclaration.java
+++ b/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/DeclarePrecedenceDeclaration.java
@@ -26,7 +26,7 @@ public class DeclarePrecedenceDeclaration extends DeclareDeclaration {
internalJavadocPropertyFactory(DeclarePrecedenceDeclaration.class);
public static final ChildListPropertyDescriptor TYPE_PATTERNS_LIST_PROPERTY =
- new ChildListPropertyDescriptor(DeclarePrecedenceDeclaration.class, "parentTypePatterns", TypePattern.class, NO_CYCLE_RISK); //$NON-NLS-1$
+ new ChildListPropertyDescriptor(DeclarePrecedenceDeclaration.class, "parentTypePatterns", AbstractTypePattern.class, NO_CYCLE_RISK); //$NON-NLS-1$
private static final List PROPERTY_DESCRIPTORS_2_0;
private static final List PROPERTY_DESCRIPTORS_3_0;
diff --git a/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/DeclareSoftDeclaration.java b/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/DeclareSoftDeclaration.java
index ae760e84b..6c1256236 100644
--- a/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/DeclareSoftDeclaration.java
+++ b/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/DeclareSoftDeclaration.java
@@ -26,7 +26,7 @@ public class DeclareSoftDeclaration extends DeclareDeclaration {
internalJavadocPropertyFactory(DeclareSoftDeclaration.class);
public static final ChildPropertyDescriptor TYPE_PATTERN_PROPERTY =
- new ChildPropertyDescriptor(DeclareSoftDeclaration.class, "typePattern", TypePattern.class, MANDATORY, NO_CYCLE_RISK); //$NON-NLS-1$
+ new ChildPropertyDescriptor(DeclareSoftDeclaration.class, "typePattern", AbstractTypePattern.class, MANDATORY, NO_CYCLE_RISK); //$NON-NLS-1$
public static final ChildPropertyDescriptor POINTCUT_PROPERTY =
new ChildPropertyDescriptor(DeclareSoftDeclaration.class, "pointcut", PointcutDesignator.class, MANDATORY, NO_CYCLE_RISK); //$NON-NLS-1$
@@ -51,7 +51,7 @@ public class DeclareSoftDeclaration extends DeclareDeclaration {
PROPERTY_DESCRIPTORS_3_0 = reapPropertyList(propertyList);
}
- private TypePattern typePattern;
+ private AbstractTypePattern typePattern;
private PointcutDesignator pointcut;
DeclareSoftDeclaration(AST ast) {
@@ -64,7 +64,7 @@ public class DeclareSoftDeclaration extends DeclareDeclaration {
result.setJavadoc(
(Javadoc) ASTNode.copySubtree(target, getJavadoc()));
result.setPointcut((PointcutDesignator)ASTNode.copySubtree(target,getPointcut()));
- result.setTypePattern((TypePattern)ASTNode.copySubtree(target,getTypePattern()));
+ result.setTypePattern((AbstractTypePattern)ASTNode.copySubtree(target,getTypePattern()));
return result;
}
@@ -166,7 +166,7 @@ public class DeclareSoftDeclaration extends DeclareDeclaration {
if (get) {
return getTypePattern();
} else {
- setTypePattern((TypePattern) child);
+ setTypePattern((AbstractTypePattern) child);
return null;
}
}
@@ -174,11 +174,11 @@ public class DeclareSoftDeclaration extends DeclareDeclaration {
return super.internalGetSetChildProperty(property, get, child);
}
- public TypePattern getTypePattern(){
+ public AbstractTypePattern getTypePattern(){
return typePattern;
}
- public void setTypePattern(TypePattern typePattern) {
+ public void setTypePattern(AbstractTypePattern typePattern) {
if (typePattern == null) {
throw new IllegalArgumentException();
}
diff --git a/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/DefaultTypePattern.java b/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/DefaultTypePattern.java
index eae206a46..005a3b2fd 100644
--- a/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/DefaultTypePattern.java
+++ b/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/DefaultTypePattern.java
@@ -18,7 +18,7 @@ import java.util.List;
*
* This class is a stub and should be deleted when concrete subclasses exist for all the different TypePattern's in AspectJ.
*/
-public class DefaultTypePattern extends TypePattern {
+public class DefaultTypePattern extends AbstractTypePattern {
private String detail;
diff --git a/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/EllipsisTypePattern.java b/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/EllipsisTypePattern.java
index 6e6d78813..66e196167 100644
--- a/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/EllipsisTypePattern.java
+++ b/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/EllipsisTypePattern.java
@@ -11,7 +11,7 @@ package org.aspectj.org.eclipse.jdt.core.dom;
import java.util.List;
-public class EllipsisTypePattern extends TypePattern {
+public class EllipsisTypePattern extends AbstractTypePattern {
public static final String ELLIPSIS_DETAIL = "..";
diff --git a/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/HasMemberTypePattern.java b/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/HasMemberTypePattern.java
index a98a1d5b8..a6b3266bc 100644
--- a/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/HasMemberTypePattern.java
+++ b/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/HasMemberTypePattern.java
@@ -14,7 +14,7 @@ import java.util.List;
/**
*
*/
-public class HasMemberTypePattern extends TypePattern {
+public class HasMemberTypePattern extends AbstractTypePattern {
private SignaturePattern signaturePattern;
diff --git a/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/IdentifierTypePattern.java b/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/IdentifierTypePattern.java
index 5c18f9450..7eea167b7 100644
--- a/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/IdentifierTypePattern.java
+++ b/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/IdentifierTypePattern.java
@@ -9,7 +9,7 @@
*******************************************************************/
package org.aspectj.org.eclipse.jdt.core.dom;
-public abstract class IdentifierTypePattern extends TypePattern {
+public abstract class IdentifierTypePattern extends AbstractTypePattern {
private Type type;
diff --git a/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/NoTypePattern.java b/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/NoTypePattern.java
index 5fdec4e3a..28c31e1f9 100644
--- a/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/NoTypePattern.java
+++ b/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/NoTypePattern.java
@@ -11,7 +11,7 @@ package org.aspectj.org.eclipse.jdt.core.dom;
import java.util.List;
-public class NoTypePattern extends TypePattern {
+public class NoTypePattern extends AbstractTypePattern {
NoTypePattern(AST ast) {
super(ast);
diff --git a/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/NotTypePattern.java b/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/NotTypePattern.java
index 882aadb02..e2231f6f0 100644
--- a/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/NotTypePattern.java
+++ b/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/NotTypePattern.java
@@ -11,9 +11,9 @@ package org.aspectj.org.eclipse.jdt.core.dom;
import java.util.List;
-public class NotTypePattern extends TypePattern {
+public class NotTypePattern extends AbstractTypePattern {
- private TypePattern negatedPattern;
+ private AbstractTypePattern negatedPattern;
/**
* The negated type pattern cannot be null
@@ -23,7 +23,7 @@ public class NotTypePattern extends TypePattern {
* @param negatedPattern
* not null
*/
- NotTypePattern(AST ast, TypePattern negatedPattern) {
+ NotTypePattern(AST ast, AbstractTypePattern negatedPattern) {
super(ast, "!");
this.negatedPattern = negatedPattern;
}
@@ -32,13 +32,13 @@ public class NotTypePattern extends TypePattern {
return null;
}
- public TypePattern getNegatedTypePattern() {
+ public AbstractTypePattern getNegatedTypePattern() {
return negatedPattern;
}
ASTNode clone0(AST target) {
ASTNode node = new NotTypePattern(target,
- (TypePattern) getNegatedTypePattern().clone(target));
+ (AbstractTypePattern) getNegatedTypePattern().clone(target));
node.setSourceRange(getStartPosition(), getLength());
return node;
}
diff --git a/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/OrTypePattern.java b/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/OrTypePattern.java
index 68239ffcd..cd5320aa3 100644
--- a/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/OrTypePattern.java
+++ b/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/OrTypePattern.java
@@ -16,8 +16,8 @@ public class OrTypePattern extends AbstractBooleanTypePattern {
public static final String OR_OPERATOR = "||";
OrTypePattern(AST ast,
- org.aspectj.org.eclipse.jdt.core.dom.TypePattern left,
- org.aspectj.org.eclipse.jdt.core.dom.TypePattern right) {
+ AbstractTypePattern left,
+ AbstractTypePattern right) {
super(ast, left, right, OR_OPERATOR);
}
@@ -27,7 +27,7 @@ public class OrTypePattern extends AbstractBooleanTypePattern {
ASTNode clone0(AST target) {
OrTypePattern cloned = new OrTypePattern(target,
- (TypePattern) getLeft().clone(target), (TypePattern) getRight()
+ (AbstractTypePattern) getLeft().clone(target), (AbstractTypePattern) getRight()
.clone(target));
cloned.setSourceRange(getStartPosition(), getLength());
return cloned;
diff --git a/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/TypeCategoryTypePattern.java b/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/TypeCategoryTypePattern.java
index d932caab3..4efae9133 100644
--- a/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/TypeCategoryTypePattern.java
+++ b/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/TypeCategoryTypePattern.java
@@ -11,7 +11,7 @@ package org.aspectj.org.eclipse.jdt.core.dom;
import java.util.List;
-public class TypeCategoryTypePattern extends TypePattern {
+public class TypeCategoryTypePattern extends AbstractTypePattern {
private int typeCategory;
diff --git a/org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/AjAST5Test.java b/org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/AjAST5Test.java
index 65fca0097..c76a3f4d3 100644
--- a/org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/AjAST5Test.java
+++ b/org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/AjAST5Test.java
@@ -14,6 +14,7 @@ package org.aspectj.tools.ajc;
import java.util.List;
import org.aspectj.org.eclipse.jdt.core.dom.AST;
+import org.aspectj.org.eclipse.jdt.core.dom.AbstractTypePattern;
import org.aspectj.org.eclipse.jdt.core.dom.AjAST;
import org.aspectj.org.eclipse.jdt.core.dom.AjTypeDeclaration;
import org.aspectj.org.eclipse.jdt.core.dom.AspectDeclaration;
@@ -23,8 +24,6 @@ import org.aspectj.org.eclipse.jdt.core.dom.DeclareParentsDeclaration;
import org.aspectj.org.eclipse.jdt.core.dom.DefaultTypePattern;
import org.aspectj.org.eclipse.jdt.core.dom.PerTypeWithin;
import org.aspectj.org.eclipse.jdt.core.dom.SimplePropertyDescriptor;
-import org.aspectj.org.eclipse.jdt.core.dom.TypePattern;
-
public class AjAST5Test extends AjASTTestCase {
@@ -113,7 +112,7 @@ public class AjAST5Test extends AjASTTestCase {
"should not be null since it is a list",
d.getStructuralProperty(element));
assertEquals("should only be able to put TypePattern's into the list",
- TypePattern.class, element.getElementType());
+ AbstractTypePattern.class, element.getElementType());
} else if (o instanceof SimplePropertyDescriptor) {
SimplePropertyDescriptor element = (SimplePropertyDescriptor) o;
assertNotNull("DeclareParentsDeclaration's " + element.getId() + " property" +
diff --git a/org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/AjASTTest.java b/org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/AjASTTest.java
index 3c8d57a20..f946b96c5 100644
--- a/org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/AjASTTest.java
+++ b/org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/AjASTTest.java
@@ -19,6 +19,7 @@ import org.aspectj.org.eclipse.jdt.core.dom.AST;
import org.aspectj.org.eclipse.jdt.core.dom.ASTNode;
import org.aspectj.org.eclipse.jdt.core.dom.ASTParser;
import org.aspectj.org.eclipse.jdt.core.dom.AbstractBooleanTypePattern;
+import org.aspectj.org.eclipse.jdt.core.dom.AbstractTypePattern;
import org.aspectj.org.eclipse.jdt.core.dom.AfterAdviceDeclaration;
import org.aspectj.org.eclipse.jdt.core.dom.AfterReturningAdviceDeclaration;
import org.aspectj.org.eclipse.jdt.core.dom.AfterThrowingAdviceDeclaration;
@@ -73,7 +74,6 @@ import org.aspectj.org.eclipse.jdt.core.dom.StringLiteral;
import org.aspectj.org.eclipse.jdt.core.dom.Type;
import org.aspectj.org.eclipse.jdt.core.dom.TypeCategoryTypePattern;
import org.aspectj.org.eclipse.jdt.core.dom.TypeDeclaration;
-import org.aspectj.org.eclipse.jdt.core.dom.TypePattern;
/**
* For each AspectJ ASTNode there is a test for:
@@ -1439,7 +1439,7 @@ public class AjASTTest extends AjASTTestCase {
ChildListPropertyDescriptor element = (ChildListPropertyDescriptor) o;
assertNotNull("DeclareErrorDeclaration's " + element.getId() + " property"
+ "should not be null since it is a list", d.getStructuralProperty(element));
- assertEquals("should only be able to put TypePattern's into the list", TypePattern.class, element.getElementType());
+ assertEquals("should only be able to put TypePattern's into the list", AbstractTypePattern.class, element.getElementType());
} else {
fail("unknown PropertyDescriptor associated with DeclareErrorDeclaration: " + o);
}
@@ -1820,12 +1820,12 @@ public class AjASTTest extends AjASTTestCase {
}
- protected void assertExpression(String expectedExpression, TypePattern node) {
+ protected void assertExpression(String expectedExpression, AbstractTypePattern node) {
assertTrue("Expected: " + expectedExpression + ". Actual: " + node.getTypePatternExpression(), node.getTypePatternExpression().equals(expectedExpression));
}
- protected void assertNodeType(Class<?> expected, TypePattern node) {
+ protected void assertNodeType(Class<?> expected, AbstractTypePattern node) {
assertTrue("Expected " + expected.toString() + ". Actual: " + node.getClass().toString(), node.getClass().equals(expected));
}
}