本文整理匯總了Java中org.walkmod.javalang.ast.body.BodyDeclaration.accept方法的典型用法代碼示例。如果您正苦於以下問題:Java BodyDeclaration.accept方法的具體用法?Java BodyDeclaration.accept怎麽用?Java BodyDeclaration.accept使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.walkmod.javalang.ast.body.BodyDeclaration
的用法示例。
在下文中一共展示了BodyDeclaration.accept方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: loadThisSymbol
import org.walkmod.javalang.ast.body.BodyDeclaration; //導入方法依賴的package包/類
private void loadThisSymbol(ObjectCreationExpr n, A arg) {
if (AnonymousClassUtil.isAnonymousClass(n) && AnonymousClassUtil.needsSymbolData(n)) {
ScopeLoader scopeLoader = new ScopeLoader(typeTable, expressionTypeAnalyzer, actionProvider);
Scope scope = n.accept(scopeLoader, symbolTable);
if (scope != null) {
symbolTable.pushScope(scope);
}
if (n.getAnonymousClassBody() != null) {
for (BodyDeclaration member : n.getAnonymousClassBody()) {
member.accept(this, arg);
}
}
if (scope != null) {
symbolTable.popScope();
}
}
}
示例2: visit
import org.walkmod.javalang.ast.body.BodyDeclaration; //導入方法依賴的package包/類
public R visit(AnnotationDeclaration n, A arg) {
if (n.getJavaDoc() != null) {
n.getJavaDoc().accept(this, arg);
}
if (n.getAnnotations() != null) {
for (AnnotationExpr a : n.getAnnotations()) {
a.accept(this, arg);
}
}
if (n.getMembers() != null) {
for (BodyDeclaration member : n.getMembers()) {
member.accept(this, arg);
}
}
return null;
}
示例3: visit
import org.walkmod.javalang.ast.body.BodyDeclaration; //導入方法依賴的package包/類
public void visit(EnumConstantDeclaration n, A arg) {
if (n.getJavaDoc() != null) {
n.getJavaDoc().accept(this, arg);
}
if (n.getAnnotations() != null) {
for (AnnotationExpr a : n.getAnnotations()) {
a.accept(this, arg);
}
}
if (n.getArgs() != null) {
for (Expression e : n.getArgs()) {
e.accept(this, arg);
}
}
if (n.getClassBody() != null) {
for (BodyDeclaration member : n.getClassBody()) {
member.accept(this, arg);
}
}
}
示例4: processMembers
import org.walkmod.javalang.ast.body.BodyDeclaration; //導入方法依賴的package包/類
public void processMembers(List<BodyDeclaration> members, T context) {
if (members != null) {
for (BodyDeclaration bd : members) {
if (bd instanceof TypeDeclaration) {
bd.accept(this, context);
}
}
}
}