本文整理汇总了Java中org.walkmod.javalang.ast.expr.FieldAccessExpr类的典型用法代码示例。如果您正苦于以下问题:Java FieldAccessExpr类的具体用法?Java FieldAccessExpr怎么用?Java FieldAccessExpr使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FieldAccessExpr类属于org.walkmod.javalang.ast.expr包,在下文中一共展示了FieldAccessExpr类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visit
import org.walkmod.javalang.ast.expr.FieldAccessExpr; //导入依赖的package包/类
@Override
public void visit(FieldAccessExpr n, A arg) {
if (n.getScope() != null) {
if (!arg.containsKey(VISITOR_SCOPE_PROCESSOR)) {
n.getScope().accept(this, arg);
}
SymbolType scopeType = (SymbolType) n.getScope().getSymbolData();
lookupSymbol(n.getField(), arg, n, scopeType, ReferenceType.VARIABLE);
} else {
lookupSymbol(n.getField(), arg, n, null, ReferenceType.VARIABLE);
}
}
示例2: visit
import org.walkmod.javalang.ast.expr.FieldAccessExpr; //导入依赖的package包/类
public Boolean visit(FieldAccessExpr n1, Node arg) {
FieldAccessExpr n2 = (FieldAccessExpr) arg;
if (!nodeEquals(n1.getScope(), n2.getScope())) {
return Boolean.FALSE;
}
if (!objEquals(n1.getField(), n2.getField())) {
return Boolean.FALSE;
}
if (!nodesEquals(n1.getTypeArgs(), n2.getTypeArgs())) {
return Boolean.FALSE;
}
return Boolean.TRUE;
}
示例3: visit
import org.walkmod.javalang.ast.expr.FieldAccessExpr; //导入依赖的package包/类
@Override
public Node visit(FieldAccessExpr _n, Object _arg) {
Expression scope = cloneNodes(_n.getScope(), _arg);
List<Type> typeArgs = visit(_n.getTypeArgs(), _arg);
FieldAccessExpr r = new FieldAccessExpr(_n.getBeginLine(), _n.getBeginColumn(), _n.getEndLine(),
_n.getEndColumn(), scope, typeArgs, _n.getField());
return r;
}
示例4: visit
import org.walkmod.javalang.ast.expr.FieldAccessExpr; //导入依赖的package包/类
public void visit(FieldAccessExpr n, Object arg) {
prepareComments(n);
printPreviousComments(n, arg);
n.getScope().accept(this, arg);
printer.print(".");
printer.print(n.getField());
}
示例5: visit
import org.walkmod.javalang.ast.expr.FieldAccessExpr; //导入依赖的package包/类
public void visit(FieldAccessExpr n, VisitorContext arg) {
if (preVisitor != null) {
preVisitor.visit(n, arg);
}
super.visit(n, arg);
if (postVisitor != null) {
postVisitor.visit(n, arg);
}
}
示例6: visit
import org.walkmod.javalang.ast.expr.FieldAccessExpr; //导入依赖的package包/类
public void visit(FieldAccessExpr n, VisitorContext ctx) {
Object o = ctx.get(NODE_TO_COMPARE_KEY);
if (o != null && o instanceof FieldAccessExpr) {
FieldAccessExpr aux = (FieldAccessExpr) o;
boolean backup = isUpdated();
setIsUpdated(false);
boolean equals = n.getField().equals(aux.getField());
inferASTChanges(n.getScope(), aux.getScope());
inferASTChanges(n.getTypeArgs(), aux.getTypeArgs());
if (!equals) {
applyUpdate(n, (Node) o);
}
if (!isUpdated()) {
if (equals) {
increaseUnmodifiedNodes(FieldAccessExpr.class);
} else {
increaseUpdatedNodes(FieldAccessExpr.class);
}
} else {
applyUpdate(n, aux, n.getTypeArgs(), aux.getTypeArgs());
increaseUpdatedNodes(FieldAccessExpr.class);
}
setIsUpdated(backup || isUpdated());
} else if (o != null) {
setIsUpdated(true);
applyUpdate(n, (Node) o);
}
}
示例7: RequiredFieldPredicate
import org.walkmod.javalang.ast.expr.FieldAccessExpr; //导入依赖的package包/类
public RequiredFieldPredicate(FieldAccessExpr field) {
this.requiredField = field;
}
示例8: visit
import org.walkmod.javalang.ast.expr.FieldAccessExpr; //导入依赖的package包/类
public R visit(FieldAccessExpr n, A arg) {
n.getScope().accept(this, arg);
return null;
}
示例9: visit
import org.walkmod.javalang.ast.expr.FieldAccessExpr; //导入依赖的package包/类
public void visit(FieldAccessExpr n, A arg) {
n.getScope().accept(this, arg);
}
示例10: visit
import org.walkmod.javalang.ast.expr.FieldAccessExpr; //导入依赖的package包/类
public Node visit(FieldAccessExpr n, A arg) {
n.setScope((Expression) n.getScope().accept(this, arg));
return n;
}
示例11: visit
import org.walkmod.javalang.ast.expr.FieldAccessExpr; //导入依赖的package包/类
public R visit(FieldAccessExpr n, A arg);
示例12: visit
import org.walkmod.javalang.ast.expr.FieldAccessExpr; //导入依赖的package包/类
public void visit(FieldAccessExpr n, A arg);