Relates to #215. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>tags/V1_9_20
return visitor.visit(this, data); | return visitor.visit(this, data); | ||||
} | } | ||||
public Object traverse(PatternNodeVisitor visitor, Object data) { | |||||
Object ret = accept(visitor, data); | |||||
if (this.signaturePattern != null && this.signaturePattern instanceof SignaturePattern) | |||||
((SignaturePattern) this.signaturePattern).traverse(visitor, ret); | |||||
if (this.typePattern != null) | |||||
this.typePattern.traverse(visitor, ret); | |||||
return ret; | |||||
} | |||||
@Override | @Override | ||||
public void resolve(IScope scope) { | public void resolve(IScope scope) { | ||||
if (!scope.getWorld().isInJava5Mode()) { | if (!scope.getWorld().isInJava5Mode()) { |
return visitor.visit(this, data); | return visitor.visit(this, data); | ||||
} | } | ||||
public Object traverse(PatternNodeVisitor visitor, Object data) { | |||||
Object ret = accept(visitor, data); | |||||
if (this.pointcut != null) | |||||
this.pointcut.traverse(visitor, ret); | |||||
return ret; | |||||
} | |||||
public void write(CompressingDataOutputStream s) throws IOException { | public void write(CompressingDataOutputStream s) throws IOException { | ||||
s.writeByte(Declare.ERROR_OR_WARNING); | s.writeByte(Declare.ERROR_OR_WARNING); | ||||
s.writeBoolean(isError); | s.writeBoolean(isError); |
return visitor.visit(this, data); | return visitor.visit(this, data); | ||||
} | } | ||||
public Object traverse(PatternNodeVisitor visitor, Object data) { | |||||
Object ret = accept(visitor, data); | |||||
if (this.child != null) | |||||
this.child.traverse(visitor, ret); | |||||
if (this.parents != null) | |||||
this.parents.traverse(visitor, ret); | |||||
return ret; | |||||
} | |||||
@Override | @Override | ||||
public Declare parameterizeWith(Map<String,UnresolvedType> typeVariableBindingMap, World w) { | public Declare parameterizeWith(Map<String,UnresolvedType> typeVariableBindingMap, World w) { | ||||
DeclareParents ret = new DeclareParents(child.parameterizeWith(typeVariableBindingMap, w), parents.parameterizeWith( | DeclareParents ret = new DeclareParents(child.parameterizeWith(typeVariableBindingMap, w), parents.parameterizeWith( |
return visitor.visit(this, data); | return visitor.visit(this, data); | ||||
} | } | ||||
public Object traverse(PatternNodeVisitor visitor, Object data) { | |||||
Object ret = accept(visitor, data); | |||||
if (this.patterns != null) | |||||
this.patterns.traverse(visitor, ret); | |||||
return ret; | |||||
} | |||||
public Declare parameterizeWith(Map typeVariableBindingMap, World w) { | public Declare parameterizeWith(Map typeVariableBindingMap, World w) { | ||||
DeclarePrecedence ret = new DeclarePrecedence(this.patterns.parameterizeWith(typeVariableBindingMap, w)); | DeclarePrecedence ret = new DeclarePrecedence(this.patterns.parameterizeWith(typeVariableBindingMap, w)); | ||||
ret.copyLocationFrom(this); | ret.copyLocationFrom(this); |
return visitor.visit(this, data); | return visitor.visit(this, data); | ||||
} | } | ||||
public Object traverse(PatternNodeVisitor visitor, Object data) { | |||||
Object ret = accept(visitor, data); | |||||
if (this.exception != null) | |||||
this.exception.traverse(visitor, ret); | |||||
if (this.pointcut != null) | |||||
this.pointcut.traverse(visitor, ret); | |||||
return ret; | |||||
} | |||||
@Override | @Override | ||||
public Declare parameterizeWith(Map typeVariableBindingMap, World w) { | public Declare parameterizeWith(Map typeVariableBindingMap, World w) { | ||||
DeclareSoft ret = new DeclareSoft(exception.parameterizeWith(typeVariableBindingMap, w), pointcut.parameterizeWith( | DeclareSoft ret = new DeclareSoft(exception.parameterizeWith(typeVariableBindingMap, w), pointcut.parameterizeWith( |
return visitor.visit(this, data); | return visitor.visit(this, data); | ||||
} | } | ||||
public Object traverse(PatternNodeVisitor visitor, Object data) { | |||||
Object ret = accept(visitor, data); | |||||
if (this.typePattern != null) | |||||
this.typePattern.traverse(visitor, ret); | |||||
return ret; | |||||
} | |||||
public void write(CompressingDataOutputStream s) throws IOException { | public void write(CompressingDataOutputStream s) throws IOException { | ||||
s.writeByte(Declare.TYPE_ERROR_OR_WARNING); | s.writeByte(Declare.TYPE_ERROR_OR_WARNING); | ||||
s.writeBoolean(isError); | s.writeBoolean(isError); |
return visitor.visit(this, data); | return visitor.visit(this, data); | ||||
} | } | ||||
public Object traverse(PatternNodeVisitor visitor, Object data) { | |||||
Object ret = accept(visitor, data); | |||||
if (this.signaturePattern != null) | |||||
this.signaturePattern.traverse(visitor, ret); | |||||
return ret; | |||||
} | |||||
} | } |
return visitor.visit(this, data); | return visitor.visit(this, data); | ||||
} | } | ||||
public Object traverse(PatternNodeVisitor visitor, Object data) { | |||||
Object ret = accept(visitor, data); | |||||
if (this.annotationPattern != null) | |||||
this.annotationPattern.traverse(visitor, ret); | |||||
if (this.returnType != null) | |||||
this.returnType.traverse(visitor, ret); | |||||
if (this.declaringType != null) | |||||
this.declaringType.traverse(visitor, ret); | |||||
if (this.name != null) | |||||
this.name.traverse(visitor, ret); | |||||
if (this.parameterTypes != null) | |||||
this.parameterTypes.traverse(visitor, ret); | |||||
if (this.throwsPattern != null) | |||||
this.throwsPattern.traverse(visitor, ret); | |||||
return ret; | |||||
} | |||||
public boolean isExactDeclaringTypePattern() { | public boolean isExactDeclaringTypePattern() { | ||||
return isExactDeclaringTypePattern; | return isExactDeclaringTypePattern; | ||||
} | } |
@Override | @Override | ||||
public Object traverse(PatternNodeVisitor visitor, Object data) { | public Object traverse(PatternNodeVisitor visitor, Object data) { | ||||
Object ret = accept(visitor, data); | Object ret = accept(visitor, data); | ||||
for (TypePattern typePattern : typePatterns) { | |||||
typePattern.traverse(visitor, ret); | |||||
if (typePatterns != null) { | |||||
for (TypePattern typePattern : typePatterns) { | |||||
typePattern.traverse(visitor, ret); | |||||
} | |||||
} | } | ||||
return ret; | return ret; | ||||
} | } |
public Object traverse(PatternNodeVisitor visitor, Object data) { | public Object traverse(PatternNodeVisitor visitor, Object data) { | ||||
Object ret = accept(visitor, data); | Object ret = accept(visitor, data); | ||||
for (TypeVariablePattern pattern : patterns) { | |||||
pattern.traverse(visitor, ret); | |||||
if (patterns != null) { | |||||
for (TypeVariablePattern pattern : patterns) { | |||||
pattern.traverse(visitor, ret); | |||||
} | |||||
} | } | ||||
return ret; | return ret; | ||||
} | } |
public Object accept(PatternNodeVisitor visitor, Object data) { | public Object accept(PatternNodeVisitor visitor, Object data) { | ||||
return visitor.visit(this, data); | return visitor.visit(this, data); | ||||
} | } | ||||
public Object traverse(PatternNodeVisitor visitor, Object data) { | |||||
Object ret = accept(visitor, data); | |||||
if (this.typePattern != null) | |||||
this.typePattern.traverse(visitor, ret); | |||||
return ret; | |||||
} | |||||
} | } |