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>tags/V1_9_8_RC1
@@ -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; | |||
} | |||
@@ -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; | |||
} |
@@ -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 |
@@ -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(", "); |
@@ -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; |
@@ -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 = "*"; | |||
@@ -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 |
@@ -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(); | |||
} |
@@ -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; |
@@ -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(); | |||
} |
@@ -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; | |||
@@ -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 = ".."; | |||
@@ -14,7 +14,7 @@ import java.util.List; | |||
/** | |||
* | |||
*/ | |||
public class HasMemberTypePattern extends TypePattern { | |||
public class HasMemberTypePattern extends AbstractTypePattern { | |||
private SignaturePattern signaturePattern; | |||
@@ -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; | |||
@@ -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); |
@@ -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; | |||
} |
@@ -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; |
@@ -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; | |||
@@ -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" + |
@@ -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)); | |||
} | |||
} |