* Method declared on ASTNode.
*/
void accept0(ASTVisitor visitor) {
- boolean visitChildren = ((AjASTVisitor)visitor).visit(this);
- if (visitChildren) {
- // visit children in normal left to right reading order
- acceptChild(visitor, getJavadoc());
- acceptChildren(visitor, this.parameters);
- acceptChild(visitor, getPointcut());
- acceptChildren(visitor, this.thrownExceptions);
- acceptChild(visitor, getBody());
+ if (visitor instanceof AjASTVisitor) {
+ boolean visitChildren = ((AjASTVisitor)visitor).visit(this);
+ if (visitChildren) {
+ // visit children in normal left to right reading order
+ acceptChild(visitor, getJavadoc());
+ acceptChildren(visitor, this.parameters);
+ acceptChild(visitor, getPointcut());
+ acceptChildren(visitor, this.thrownExceptions);
+ acceptChild(visitor, getBody());
+ }
+ ((AjASTVisitor)visitor).endVisit(this);
}
- ((AjASTVisitor)visitor).endVisit(this);
}
}
}
void accept0(ASTVisitor visitor) {
- boolean visitChildren = ((AjASTVisitor)visitor).visit(this);
- if (visitChildren) {
- // visit children in normal left to right reading order
- acceptChild(visitor, getJavadoc());
- acceptChildren(visitor, this.parameters);
- acceptChild(visitor, getPointcut());
- acceptChild(visitor, getReturning());
- acceptChildren(visitor, this.thrownExceptions);
- acceptChild(visitor, getBody());
+ if (visitor instanceof AjASTVisitor) {
+ boolean visitChildren = ((AjASTVisitor)visitor).visit(this);
+ if (visitChildren) {
+ // visit children in normal left to right reading order
+ acceptChild(visitor, getJavadoc());
+ acceptChildren(visitor, this.parameters);
+ acceptChild(visitor, getPointcut());
+ acceptChild(visitor, getReturning());
+ acceptChildren(visitor, this.thrownExceptions);
+ acceptChild(visitor, getBody());
+ }
+ ((AjASTVisitor)visitor).endVisit(this);
}
- ((AjASTVisitor)visitor).endVisit(this);
}
}
\ No newline at end of file
}
void accept0(ASTVisitor visitor) {
- boolean visitChildren = ((AjASTVisitor)visitor).visit(this);
- if (visitChildren) {
- // visit children in normal left to right reading order
- acceptChild(visitor, getJavadoc());
- acceptChildren(visitor, this.parameters);
- acceptChild(visitor, getPointcut());
- acceptChild(visitor, getThrowing());
- acceptChildren(visitor, this.thrownExceptions);
- acceptChild(visitor, getBody());
+ if (visitor instanceof AjASTVisitor) {
+ boolean visitChildren = ((AjASTVisitor)visitor).visit(this);
+ if (visitChildren) {
+ // visit children in normal left to right reading order
+ acceptChild(visitor, getJavadoc());
+ acceptChildren(visitor, this.parameters);
+ acceptChild(visitor, getPointcut());
+ acceptChild(visitor, getThrowing());
+ acceptChildren(visitor, this.thrownExceptions);
+ acceptChild(visitor, getBody());
+ }
+ ((AjASTVisitor)visitor).endVisit(this);
}
- ((AjASTVisitor)visitor).endVisit(this);
}
}
\ No newline at end of file
return ((AjASTMatcher)matcher).match(this, other);
}
void accept0(ASTVisitor visitor) {
- boolean visitChildren = ((AjASTVisitor)visitor).visit(this);
- if (visitChildren) {
- // visit children in normal left to right reading order
- acceptChild(visitor, getLeft());
- acceptChild(visitor, getRight());
- // todo: accept the parameters here
+ if (visitor instanceof AjASTVisitor) {
+ boolean visitChildren = ((AjASTVisitor)visitor).visit(this);
+ if (visitChildren) {
+ // visit children in normal left to right reading order
+ acceptChild(visitor, getLeft());
+ acceptChild(visitor, getRight());
+ // todo: accept the parameters here
+ }
+ ((AjASTVisitor)visitor).endVisit(this);
}
- ((AjASTVisitor)visitor).endVisit(this);
}
int treeSize() {
return
* Method declared on ASTNode.
*/
void accept0(ASTVisitor visitor) {
- boolean visitChildren = ((AjASTVisitor)visitor).visit(this);
- if (visitChildren) {
- // visit children in normal left to right reading order
- acceptChild(visitor, getJavadoc());
- if (ast.apiLevel == AST.JLS2_INTERNAL) {
- acceptChild(visitor, getReturnType());
- } else {
- acceptChild(visitor, getReturnType2());
+ if (visitor instanceof AjASTVisitor) {
+ boolean visitChildren = ((AjASTVisitor)visitor).visit(this);
+ if (visitChildren) {
+ // visit children in normal left to right reading order
+ acceptChild(visitor, getJavadoc());
+ if (ast.apiLevel == AST.JLS2_INTERNAL) {
+ acceptChild(visitor, getReturnType());
+ } else {
+ acceptChild(visitor, getReturnType2());
+ }
+
+ acceptChildren(visitor, this.parameters);
+ acceptChild(visitor, getPointcut());
+ acceptChildren(visitor, this.thrownExceptions);
+ acceptChild(visitor, getBody());
}
-
- acceptChildren(visitor, this.parameters);
- acceptChild(visitor, getPointcut());
- acceptChildren(visitor, this.thrownExceptions);
- acceptChild(visitor, getBody());
+ ((AjASTVisitor)visitor).endVisit(this);
}
- ((AjASTVisitor)visitor).endVisit(this);
}
}
* Method declared on ASTNode.
*/
void accept0(ASTVisitor visitor) {
- boolean visitChildren = ((AjASTVisitor)visitor).visit(this);
- if (visitChildren) {
- // visit children in normal left to right reading order
- acceptChild(visitor, getJavadoc());
- acceptChildren(visitor, this.parameters);
- acceptChild(visitor, getPointcut());
- acceptChildren(visitor, this.thrownExceptions);
- acceptChild(visitor, getBody());
+ if (visitor instanceof AjASTVisitor) {
+ boolean visitChildren = ((AjASTVisitor)visitor).visit(this);
+ if (visitChildren) {
+ // visit children in normal left to right reading order
+ acceptChild(visitor, getJavadoc());
+ acceptChildren(visitor, this.parameters);
+ acceptChild(visitor, getPointcut());
+ acceptChildren(visitor, this.thrownExceptions);
+ acceptChild(visitor, getBody());
+ }
+ ((AjASTVisitor)visitor).endVisit(this);
}
- ((AjASTVisitor)visitor).endVisit(this);
}
}
return ((AjASTMatcher)matcher).match(this, other);
}
void accept0(ASTVisitor visitor) {
- boolean visitChildren = ((AjASTVisitor)visitor).visit(this);
- if (visitChildren) {
- // visit children in normal left to right reading order
- acceptChild(visitor, getBody());
- // todo: accept the parameters here
+ if (visitor instanceof AjASTVisitor) {
+ boolean visitChildren = ((AjASTVisitor)visitor).visit(this);
+ if (visitChildren) {
+ // visit children in normal left to right reading order
+ acceptChild(visitor, getBody());
+ // todo: accept the parameters here
+ }
+ ((AjASTVisitor)visitor).endVisit(this);
}
- ((AjASTVisitor)visitor).endVisit(this);
}
int treeSize() {
return
* Method declared on ASTNode.
*/
void accept0(ASTVisitor visitor) {
- boolean visitChildren = ((AjASTVisitor)visitor).visit(this);
- if (visitChildren) {
- // visit children in normal left to right reading order
- acceptChild(visitor, getJavadoc());
+ if (visitor instanceof AjASTVisitor) {
+ boolean visitChildren = ((AjASTVisitor)visitor).visit(this);
+ if (visitChildren) {
+ // visit children in normal left to right reading order
+ acceptChild(visitor, getJavadoc());
+ }
+ ((AjASTVisitor)visitor).endVisit(this);
}
- ((AjASTVisitor)visitor).endVisit(this);
}
/**
return ((AjASTMatcher)matcher).match(this, other);
}
void accept0(ASTVisitor visitor) {
- boolean visitChildren = ((AjASTVisitor)visitor).visit(this);
- ((AjASTVisitor)visitor).endVisit(this);
+ if (visitor instanceof AjASTVisitor) {
+ boolean visitChildren = ((AjASTVisitor)visitor).visit(this);
+ ((AjASTVisitor)visitor).endVisit(this);
+ }
}
int treeSize() {
return memSize();
}
void accept0(ASTVisitor visitor) {
- boolean visitChildren = ((AjASTVisitor)visitor).visit(this);
- if (visitChildren) {
- // visit children in normal left to right reading order
- acceptChild(visitor, getJavadoc());
- if (this.ast.apiLevel >= AST.JLS3) {
- acceptChildren(visitor, this.modifiers);
+ if (visitor instanceof AjASTVisitor) {
+ boolean visitChildren = ((AjASTVisitor)visitor).visit(this);
+ if (visitChildren) {
+ // visit children in normal left to right reading order
+ acceptChild(visitor, getJavadoc());
+ if (this.ast.apiLevel >= AST.JLS3) {
+ acceptChildren(visitor, this.modifiers);
+ }
+ acceptChild(visitor, getType());
+ acceptChildren(visitor, this.variableDeclarationFragments);
}
- acceptChild(visitor, getType());
- acceptChildren(visitor, this.variableDeclarationFragments);
+ ((AjASTVisitor)visitor).endVisit(this);
}
- ((AjASTVisitor)visitor).endVisit(this);
}
}
\ No newline at end of file
/* (omit javadoc for this method)
* Method declared on ASTNode.
*/
- void accept0(ASTVisitor ajvis) {
- boolean visitChildren = ajvis.visit(this);
- if (visitChildren) {
- // visit children in normal left to right reading order
- acceptChild(ajvis, getJavadoc());
- if (this.ast.apiLevel == AST.JLS2_INTERNAL) {
- acceptChild(ajvis, getReturnType());
- } else {
- acceptChildren(ajvis, this.modifiers);
- acceptChildren(ajvis, (NodeList)this.typeParameters());
- acceptChild(ajvis, getReturnType2());
+ void accept0(ASTVisitor visitor) {
+ if (visitor instanceof AjASTVisitor) {
+ AjASTVisitor ajvis = (AjASTVisitor)visitor;
+ boolean visitChildren = ajvis.visit(this);
+ if (visitChildren) {
+ // visit children in normal left to right reading order
+ acceptChild(ajvis, getJavadoc());
+ if (this.ast.apiLevel == AST.JLS2_INTERNAL) {
+ acceptChild(ajvis, getReturnType());
+ } else {
+ acceptChildren(ajvis, this.modifiers);
+ acceptChildren(ajvis, (NodeList)this.typeParameters());
+ acceptChild(ajvis, getReturnType2());
+ }
+ // n.b. visit return type even for constructors
+ acceptChild(ajvis, getName());
+ acceptChildren(ajvis, this.parameters);
+ acceptChildren(ajvis, (NodeList)this.thrownExceptions());
+ acceptChild(ajvis, getBody());
}
- // n.b. visit return type even for constructors
- acceptChild(ajvis, getName());
- acceptChildren(ajvis, this.parameters);
- acceptChildren(ajvis, (NodeList)this.thrownExceptions());
- acceptChild(ajvis, getBody());
+ ajvis.endVisit(this);
}
- ajvis.endVisit(this);
}
}
\ No newline at end of file
return ((AjASTMatcher)matcher).match(this, other);
}
void accept0(ASTVisitor visitor) {
- boolean visitChildren = ((AjASTVisitor)visitor).visit(this);
- if (visitChildren) {
- // visit children in normal left to right reading order
- acceptChild(visitor, getBody());
- // todo: accept the parameters here
+ if (visitor instanceof AjASTVisitor) {
+ boolean visitChildren = ((AjASTVisitor)visitor).visit(this);
+ if (visitChildren) {
+ // visit children in normal left to right reading order
+ acceptChild(visitor, getBody());
+ // todo: accept the parameters here
+ }
+ ((AjASTVisitor)visitor).endVisit(this);
}
- ((AjASTVisitor)visitor).endVisit(this);
}
int treeSize() {
return
return ((AjASTMatcher)matcher).match(this, other);
}
void accept0(ASTVisitor visitor) {
- boolean visitChildren = ((AjASTVisitor)visitor).visit(this);
- if (visitChildren) {
- // visit children in normal left to right reading order
- acceptChild(visitor, getLeft());
- acceptChild(visitor, getRight());
- // todo: accept the parameters here
+ if (visitor instanceof AjASTVisitor) {
+ boolean visitChildren = ((AjASTVisitor)visitor).visit(this);
+ if (visitChildren) {
+ // visit children in normal left to right reading order
+ acceptChild(visitor, getLeft());
+ acceptChild(visitor, getRight());
+ // todo: accept the parameters here
+ }
+ ((AjASTVisitor)visitor).endVisit(this);
}
- ((AjASTVisitor)visitor).endVisit(this);
}
int treeSize() {
return
return ((AjASTMatcher)matcher).match(this, other);
}
void accept0(ASTVisitor visitor) {
- boolean visitChildren = ((AjASTVisitor)visitor).visit(this);
- if (visitChildren) {
- // visit children in normal left to right reading order
- acceptChild(visitor, getBody());
- // todo: accept the parameters here
+ if (visitor instanceof AjASTVisitor) {
+ boolean visitChildren = ((AjASTVisitor)visitor).visit(this);
+ if (visitChildren) {
+ // visit children in normal left to right reading order
+ acceptChild(visitor, getBody());
+ // todo: accept the parameters here
+ }
+ ((AjASTVisitor)visitor).endVisit(this);
}
- ((AjASTVisitor)visitor).endVisit(this);
}
int treeSize() {
return
return ((AjASTMatcher)matcher).match(this, other);
}
void accept0(ASTVisitor visitor) {
- boolean visitChildren = ((AjASTVisitor)visitor).visit(this);
- if (visitChildren) {
- // visit children in normal left to right reading order
- acceptChild(visitor, getBody());
- // todo: accept the parameters here
+ if (visitor instanceof AjASTVisitor) {
+ boolean visitChildren = ((AjASTVisitor)visitor).visit(this);
+ if (visitChildren) {
+ // visit children in normal left to right reading order
+ acceptChild(visitor, getBody());
+ // todo: accept the parameters here
+ }
+ ((AjASTVisitor)visitor).endVisit(this);
}
- ((AjASTVisitor)visitor).endVisit(this);
}
int treeSize() {
return
return ((AjASTMatcher)matcher).match(this, other);
}
void accept0(ASTVisitor visitor) {
- boolean visitChildren = ((AjASTVisitor)visitor).visit(this);
- if (visitChildren) {
- // visit children in normal left to right reading order
- // ajh02: remember to visit the type thingy here
+ if (visitor instanceof AjASTVisitor) {
+ boolean visitChildren = ((AjASTVisitor)visitor).visit(this);
+ if (visitChildren) {
+ // visit children in normal left to right reading order
+ // ajh02: remember to visit the type thingy here
+ }
+ ((AjASTVisitor)visitor).endVisit(this);
}
- ((AjASTVisitor)visitor).endVisit(this);
}
int treeSize() {
return
return ((AjASTMatcher)matcher).match(this, other);
}
void accept0(ASTVisitor visitor) {
- boolean visitChildren = ((AjASTVisitor)visitor).visit(this);
- if (visitChildren) {
- // visit children in normal left to right reading order
- acceptChild(visitor, getName());
- // todo: accept the parameters here
+ if (visitor instanceof AjASTVisitor) {
+ boolean visitChildren = ((AjASTVisitor)visitor).visit(this);
+ if (visitChildren) {
+ // visit children in normal left to right reading order
+ acceptChild(visitor, getName());
+ // todo: accept the parameters here
+ }
+ ((AjASTVisitor)visitor).endVisit(this);
}
- ((AjASTVisitor)visitor).endVisit(this);
}
int treeSize() {
return