本文整理汇总了Java中com.github.javaparser.ast.body.EnumConstantDeclaration.getArgs方法的典型用法代码示例。如果您正苦于以下问题:Java EnumConstantDeclaration.getArgs方法的具体用法?Java EnumConstantDeclaration.getArgs怎么用?Java EnumConstantDeclaration.getArgs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.github.javaparser.ast.body.EnumConstantDeclaration
的用法示例。
在下文中一共展示了EnumConstantDeclaration.getArgs方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visit
import com.github.javaparser.ast.body.EnumConstantDeclaration; //导入方法依赖的package包/类
@Override
public void visit(final EnumConstantDeclaration n, final Object arg) {
printer.printLn("EnumConstantDeclaration");
printJavaComment(n.getComment(), arg);
printJavadoc(n.getJavaDoc(), arg);
printMemberAnnotations(n.getAnnotations(), arg);
printer.print(n.getName());
if (n.getArgs() != null) {
printArguments(n.getArgs(), arg);
}
if (n.getClassBody() != null) {
printer.printLn(" {");
printer.indent();
printMembers(n.getClassBody(), arg);
printer.unindent();
printer.printLn("}");
}
}
示例2: visit
import com.github.javaparser.ast.body.EnumConstantDeclaration; //导入方法依赖的package包/类
@Override public void visit(final EnumConstantDeclaration n, final Object arg) {
printJavaComment(n.getComment(), arg);
printJavadoc(n.getJavaDoc(), arg);
printMemberAnnotations(n.getAnnotations(), arg);
printer.print(n.getName());
if (n.getArgs() != null) {
printArguments(n.getArgs(), arg);
}
if (!n.getClassBody().isEmpty()) {
printer.printLn(" {");
printer.indent();
printMembers(n.getClassBody(), arg);
printer.unindent();
printer.printLn("}");
}
}
示例3: visit
import com.github.javaparser.ast.body.EnumConstantDeclaration; //导入方法依赖的package包/类
@Override public void visit(final EnumConstantDeclaration n, final A arg) {
visitComment(n.getComment(), arg);
if (n.getJavaDoc() != null) {
n.getJavaDoc().accept(this, arg);
}
if (n.getAnnotations() != null) {
for (final AnnotationExpr a : n.getAnnotations()) {
a.accept(this, arg);
}
}
if (n.getArgs() != null) {
for (final Expression e : n.getArgs()) {
e.accept(this, arg);
}
}
if (n.getClassBody() != null) {
for (final BodyDeclaration member : n.getClassBody()) {
member.accept(this, arg);
}
}
}
示例4: visit
import com.github.javaparser.ast.body.EnumConstantDeclaration; //导入方法依赖的package包/类
@Override public void visit(final EnumConstantDeclaration n, final A arg) {
jw.write(n);
visitComment(n.getComment(), arg);
if (n.getJavaDoc() != null) {
n.getJavaDoc().accept(this, arg);
}
if (n.getAnnotations() != null) {
for (final AnnotationExpr a : n.getAnnotations()) {
a.accept(this, arg);
}
}
if (n.getArgs() != null) {
for (final Expression e : n.getArgs()) {
e.accept(this, arg);
}
}
if (n.getClassBody() != null) {
for (final BodyDeclaration member : n.getClassBody()) {
member.accept(this, arg);
}
}
}
示例5: visit
import com.github.javaparser.ast.body.EnumConstantDeclaration; //导入方法依赖的package包/类
@Override public Node visit(final EnumConstantDeclaration n, final A arg) {
visitComment(n, arg);
final 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);
}
final List<Expression> args = n.getArgs();
if (args != null) {
for (int i = 0; i < args.size(); i++) {
args.set(i, (Expression) args.get(i).accept(this, arg));
}
removeNulls(args);
}
final List<BodyDeclaration<?>> classBody = n.getClassBody();
if (classBody != null) {
for (int i = 0; i < classBody.size(); i++) {
classBody.set(i, (BodyDeclaration<?>) classBody.get(i).accept(this, arg));
}
removeNulls(classBody);
}
return n;
}
示例6: visit
import com.github.javaparser.ast.body.EnumConstantDeclaration; //导入方法依赖的package包/类
@Override public void visit(final EnumConstantDeclaration n, final Object arg) {
printJavaComment(n.getComment(), arg);
printJavadoc(n.getJavaDoc(), arg);
printMemberAnnotations(n.getAnnotations(), arg);
printer.print(n.getName());
if (n.getArgs() != null) {
printArguments(n.getArgs(), arg);
}
if (n.getClassBody() != null) {
printer.printLn(" {");
printer.indent();
printMembers(n.getClassBody(), arg);
printer.unindent();
printer.printLn("}");
}
}
示例7: visit
import com.github.javaparser.ast.body.EnumConstantDeclaration; //导入方法依赖的package包/类
@Override
public JCTree visit(final EnumConstantDeclaration n, final Object arg) {
//ARG0: JCExpression meth
JCExpression arg0 = new AJCIdent(make.Ident(names.fromString(n.getName())), null);
/*
if (n.getJavaDoc() != null) {
JCTree result = n.getJavaDoc().accept(this, arg);
}
if (n.getAnnotations() != null) {
for (final AnnotationExpr a : n.getAnnotations()) {
JCTree result = a.accept(this, arg);
}
}
*/
//ARG1: List<JCExpression> args
List<JCExpression> arg1 = List.<JCExpression>nil();
// JCTree adds a string with name as first parameter
arg1 = arg1.append(new AJCLiteral(make.Literal(n.getName()), null));
if (n.getArgs() != null) {
for (final Expression e : n.getArgs()) {
arg1 = arg1.append((JCExpression) e.accept(this, arg));
}
}
/* TODO - Not treating method declarations yet
if (n.getClassBody() != null) {
for (final BodyDeclaration member : n.getClassBody()) {
JCTree result = member.accept(this, arg);
}
}
*/
return new AJCMethodInvocation(make.App(arg0, arg1), ((n.getComment() != null) ? n.getComment().getContent() : null));
}
示例8: visit
import com.github.javaparser.ast.body.EnumConstantDeclaration; //导入方法依赖的package包/类
@Override public Node visit(final EnumConstantDeclaration n, final A arg) {
if (n.getJavaDoc() != null) {
n.setJavaDoc((JavadocComment) n.getJavaDoc().accept(this, arg));
}
final 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);
}
final List<Expression> args = n.getArgs();
if (args != null) {
for (int i = 0; i < args.size(); i++) {
args.set(i, (Expression) args.get(i).accept(this, arg));
}
removeNulls(args);
}
final List<BodyDeclaration> classBody = n.getClassBody();
if (classBody != null) {
for (int i = 0; i < classBody.size(); i++) {
classBody.set(i, (BodyDeclaration) classBody.get(i).accept(this, arg));
}
removeNulls(classBody);
}
return n;
}
示例9: visit
import com.github.javaparser.ast.body.EnumConstantDeclaration; //导入方法依赖的package包/类
@Override public void visit(final EnumConstantDeclaration n, final A arg) {
visitComment(n.getComment(), arg);
visitAnnotations(n, arg);
if (n.getArgs() != null) {
for (final Expression e : n.getArgs()) {
e.accept(this, arg);
}
}
if (n.getClassBody() != null) {
for (final BodyDeclaration<?> member : n.getClassBody()) {
member.accept(this, arg);
}
}
}