本文整理汇总了Java中org.walkmod.javalang.ast.body.AnnotationMemberDeclaration类的典型用法代码示例。如果您正苦于以下问题:Java AnnotationMemberDeclaration类的具体用法?Java AnnotationMemberDeclaration怎么用?Java AnnotationMemberDeclaration使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AnnotationMemberDeclaration类属于org.walkmod.javalang.ast.body包,在下文中一共展示了AnnotationMemberDeclaration类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visit
import org.walkmod.javalang.ast.body.AnnotationMemberDeclaration; //导入依赖的package包/类
@Override
public void visit(AnnotationMemberDeclaration 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);
}
}
n.getType().accept(expressionTypeAnalyzer, arg);
Expression expr = n.getDefaultValue();
if (expr != null) {
expr.accept(expressionTypeAnalyzer, arg);
}
}
示例2: visit
import org.walkmod.javalang.ast.body.AnnotationMemberDeclaration; //导入依赖的package包/类
public Boolean visit(AnnotationMemberDeclaration n1, Node arg) {
AnnotationMemberDeclaration n2 = (AnnotationMemberDeclaration) arg;
if (n1.getModifiers() != n2.getModifiers()) {
return Boolean.FALSE;
}
if (!objEquals(n1.getName(), n2.getName())) {
return Boolean.FALSE;
}
if (!nodesEquals(n1.getAnnotations(), n2.getAnnotations())) {
return Boolean.FALSE;
}
if (!nodeEquals(n1.getDefaultValue(), n2.getDefaultValue())) {
return Boolean.FALSE;
}
if (!nodeEquals(n1.getType(), n2.getType())) {
return Boolean.FALSE;
}
return Boolean.TRUE;
}
示例3: visit
import org.walkmod.javalang.ast.body.AnnotationMemberDeclaration; //导入依赖的package包/类
public Node visit(AnnotationMemberDeclaration n, A arg) {
if (n.getJavaDoc() != null) {
n.setJavaDoc((JavadocComment) n.getJavaDoc().accept(this, arg));
}
List<AnnotationExpr> annotations = n.getAnnotations();
if (annotations != null) {
for (int i = 0; i < annotations.size(); i++) {
annotations.set(i, (AnnotationExpr) annotations.get(i).accept(this, arg));
}
removeNulls(annotations);
}
n.setType((Type) n.getType().accept(this, arg));
if (n.getDefaultValue() != null) {
n.setDefaultValue((Expression) n.getDefaultValue().accept(this, arg));
}
return n;
}
示例4: visit
import org.walkmod.javalang.ast.body.AnnotationMemberDeclaration; //导入依赖的package包/类
public R visit(AnnotationMemberDeclaration 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);
}
}
n.getType().accept(this, arg);
if (n.getDefaultValue() != null) {
n.getDefaultValue().accept(this, arg);
}
return null;
}
示例5: visit
import org.walkmod.javalang.ast.body.AnnotationMemberDeclaration; //导入依赖的package包/类
@Override
public Node visit(AnnotationMemberDeclaration _n, Object _arg) {
JavadocComment javaDoc = cloneNodes(_n.getJavaDoc(), _arg);
List<AnnotationExpr> annotations = visit(_n.getAnnotations(), _arg);
Type type_ = cloneNodes(_n.getType(), _arg);
Expression defaultValue = cloneNodes(_n.getDefaultValue(), _arg);
AnnotationMemberDeclaration r =
new AnnotationMemberDeclaration(_n.getBeginLine(), _n.getBeginColumn(), _n.getEndLine(),
_n.getEndColumn(), javaDoc, _n.getModifiers(), annotations, type_, _n.getName(), defaultValue);
return r;
}
示例6: visit
import org.walkmod.javalang.ast.body.AnnotationMemberDeclaration; //导入依赖的package包/类
public void visit(AnnotationMemberDeclaration n, Object arg) {
prepareComments(n);
JavadocComment comment = n.getJavaDoc();
if (comment != null) {
printPreviousComments(comment, arg);
}
printJavadoc(comment, arg);
if (comment != null && !n.isNewNode() && !comment.isNewNode()) {
int start = comment.getEndLine();
int end = n.getBeginLine();
for (int i = start + 1; i < end; i++) {
printer.printLn();
}
}
printMemberAnnotations(n.getAnnotations(), arg);
printModifiers(n.getModifiers());
n.getType().accept(this, arg);
printer.print(" ");
printer.print(n.getName());
printer.print("()");
if (n.getDefaultValue() != null) {
printer.print(" default ");
n.getDefaultValue().accept(this, arg);
}
printer.print(";");
}
示例7: visit
import org.walkmod.javalang.ast.body.AnnotationMemberDeclaration; //导入依赖的package包/类
public void visit(AnnotationMemberDeclaration 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);
}
}
n.getType().accept(this, arg);
if (n.getDefaultValue() != null) {
n.getDefaultValue().accept(this, arg);
}
}
示例8: visit
import org.walkmod.javalang.ast.body.AnnotationMemberDeclaration; //导入依赖的package包/类
public void visit(AnnotationMemberDeclaration n, VisitorContext arg) {
if (preVisitor != null) {
preVisitor.visit(n, arg);
}
super.visit(n, arg);
if (postVisitor != null) {
postVisitor.visit(n, arg);
}
}
示例9: compare
import org.walkmod.javalang.ast.body.AnnotationMemberDeclaration; //导入依赖的package包/类
@Override
public int compare(AnnotationMemberDeclaration an1, AnnotationMemberDeclaration an2) {
if (an1.getName() == null || an2.getName() == null) {
throw new IllegalArgumentException(
"Annotation member must have a name in order to compare them" + an1 + "-" + an2);
}
return an1.getName().compareTo(an2.getName());
}
示例10: AnnotationTypeMemberDeclaration
import org.walkmod.javalang.ast.body.AnnotationMemberDeclaration; //导入依赖的package包/类
final public AnnotationMemberDeclaration AnnotationTypeMemberDeclaration(Modifier modifier) throws ParseException {
Type type;
String name;
Expression defaultVal = null;
type = Type();
jj_consume_token(IDENTIFIER);
name = token.image;
jj_consume_token(LPAREN);
jj_consume_token(RPAREN);
switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
case _DEFAULT:
defaultVal = DefaultValue();
break;
default:
jj_la1[174] = jj_gen;;
}
jj_consume_token(SEMICOLON);
int line = modifier.beginLine;
int column = modifier.beginColumn;
{
if (line == -1) {
line = type.getBeginLine();
column = type.getBeginColumn();
}
}
{
if (true)
return new AnnotationMemberDeclaration(line, column, token.endLine, token.endColumn, popJavadoc(),
modifier.modifiers, modifier.annotations, type, name, defaultVal);
}
throw new Error("Missing return statement in function");
}
示例11: visit
import org.walkmod.javalang.ast.body.AnnotationMemberDeclaration; //导入依赖的package包/类
public void visit(AnnotationMemberDeclaration n, VisitorContext ctx) {
Object o = ctx.get(NODE_TO_COMPARE_KEY);
if (o != null && o instanceof AnnotationMemberDeclaration) {
boolean backup = isUpdated();
setIsUpdated(false);
AnnotationMemberDeclaration aux = (AnnotationMemberDeclaration) o;
boolean equals = n.getName().equals(aux.getName()) && n.getModifiers() == aux.getModifiers();
Position pos = popPosition();
pushPosition(aux);
inferASTChanges(n.getJavaDoc(), aux.getJavaDoc());
inferASTChanges(n.getAnnotations(), aux.getAnnotations());
inferASTChanges(n.getDefaultValue(), aux.getDefaultValue());
inferASTChanges(n.getType(), aux.getType());
popPosition();
pushPosition(pos);
if (!equals) {
applyUpdate(n, (Node) o);
}
if (!isUpdated()) {
if (equals) {
increaseUnmodifiedNodes(AnnotationMemberDeclaration.class);
} else {
increaseUpdatedNodes(AnnotationMemberDeclaration.class);
}
} else {
increaseUpdatedNodes(AnnotationMemberDeclaration.class);
}
setIsUpdated(backup || isUpdated());
} else if (o != null) {
setIsUpdated(true);
applyUpdate(n, (Node) o);
}
}
示例12: getActions
import org.walkmod.javalang.ast.body.AnnotationMemberDeclaration; //导入依赖的package包/类
@Override
public List<SymbolAction> getActions(AnnotationMemberDeclaration n) {
buildActionList();
return actions;
}
示例13: getActions
import org.walkmod.javalang.ast.body.AnnotationMemberDeclaration; //导入依赖的package包/类
public List<SymbolAction> getActions(AnnotationMemberDeclaration n);
示例14: visit
import org.walkmod.javalang.ast.body.AnnotationMemberDeclaration; //导入依赖的package包/类
public R visit(AnnotationMemberDeclaration n, A arg);
示例15: visit
import org.walkmod.javalang.ast.body.AnnotationMemberDeclaration; //导入依赖的package包/类
public void visit(AnnotationMemberDeclaration n, A arg);