当前位置: 首页>>代码示例>>Java>>正文


Java ExplicitConstructorInvocationStmt.getArgs方法代码示例

本文整理汇总了Java中com.github.javaparser.ast.stmt.ExplicitConstructorInvocationStmt.getArgs方法的典型用法代码示例。如果您正苦于以下问题:Java ExplicitConstructorInvocationStmt.getArgs方法的具体用法?Java ExplicitConstructorInvocationStmt.getArgs怎么用?Java ExplicitConstructorInvocationStmt.getArgs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.github.javaparser.ast.stmt.ExplicitConstructorInvocationStmt的用法示例。


在下文中一共展示了ExplicitConstructorInvocationStmt.getArgs方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: visit

import com.github.javaparser.ast.stmt.ExplicitConstructorInvocationStmt; //导入方法依赖的package包/类
@Override public void visit(final ExplicitConstructorInvocationStmt n, final A arg) {
	visitComment(n.getComment(), arg);
	if (!n.isThis()) {
		if (n.getExpr() != null) {
			n.getExpr().accept(this, arg);
		}
	}
	if (n.getTypeArgs() != null) {
		for (final Type t : n.getTypeArgs()) {
			t.accept(this, arg);
		}
	}
	if (n.getArgs() != null) {
		for (final Expression e : n.getArgs()) {
			e.accept(this, arg);
		}
	}
}
 
开发者ID:plum-umd,项目名称:java-sketch,代码行数:19,代码来源:VoidVisitorAdapter.java

示例2: visit

import com.github.javaparser.ast.stmt.ExplicitConstructorInvocationStmt; //导入方法依赖的package包/类
@Override public void visit(final ExplicitConstructorInvocationStmt n, final A arg) {
    jw.write(n); 
    visitComment(n.getComment(), arg);
    if (!n.isThis()) {
        if (n.getExpr() != null) {
            n.getExpr().accept(this, arg);
        }
    }
    if (n.getTypeArgs() != null) {
        for (final Type t : n.getTypeArgs()) {
            t.accept(this, arg);
        }
    }
    if (n.getArgs() != null) {
        for (final Expression e : n.getArgs()) {
            e.accept(this, arg);
        }
    }
}
 
开发者ID:plum-umd,项目名称:java-sketch,代码行数:20,代码来源:JsonVisitorAdapter.java

示例3: visit

import com.github.javaparser.ast.stmt.ExplicitConstructorInvocationStmt; //导入方法依赖的package包/类
@Override public Node visit(final ExplicitConstructorInvocationStmt n, final A arg) {
	if (!n.isThis()) {
		if (n.getExpr() != null) {
			n.setExpr((Expression) n.getExpr().accept(this, arg));
		}
	}
	final List<Type> typeArgs = n.getTypeArgs();
	if (typeArgs != null) {
		for (int i = 0; i < typeArgs.size(); i++) {
			typeArgs.set(i, (Type) typeArgs.get(i).accept(this, arg));
		}
		removeNulls(typeArgs);
	}
	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);
	}
	return n;
}
 
开发者ID:plum-umd,项目名称:java-sketch,代码行数:23,代码来源:ModifierVisitorAdapter.java

示例4: visit

import com.github.javaparser.ast.stmt.ExplicitConstructorInvocationStmt; //导入方法依赖的package包/类
@Override public Node visit(final ExplicitConstructorInvocationStmt n, final A arg) {
	visitComment(n, arg);
	if (!n.isThis() && n.getExpr() != null) {
		n.setExpr((Expression) n.getExpr().accept(this, arg));
	}
       final List<Type<?>> typeArguments = n.getTypeArguments();
       if (typeArguments != null) {
           for (int i = 0; i < typeArguments.size(); i++) {
               typeArguments.set(i, (Type<?>) typeArguments.get(i).accept(this, arg));
           }
           removeNulls(typeArguments);
       }
	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);
	}
	return n;
}
 
开发者ID:javaparser,项目名称:javasymbolsolver,代码行数:22,代码来源:ModifierVisitorAdapter.java

示例5: visit

import com.github.javaparser.ast.stmt.ExplicitConstructorInvocationStmt; //导入方法依赖的package包/类
@Override
public JCTree visit(final ExplicitConstructorInvocationStmt n, final Object arg) {
    //ARG0: List<JCExpression> typeargs
    List<JCExpression> arg0 = List.<JCExpression>nil();
    if (n.getTypeArgs() != null) {
        for (final com.github.javaparser.ast.type.Type t : n.getTypeArgs()) {
            arg0 = arg0.append((JCExpression) t.accept(this, arg));
        }
    }

    //ARG1: JCExpression fn
    JCExpression arg1;
    if (n.isThis()) {
        arg1 = new AJCIdent(make.Ident(names.fromString("this")), null);
    } else {
        if (n.getExpr() != null) {
            arg1 = new AJCFieldAccess(make.Select((JCExpression) n.getExpr().accept(this, arg), names.fromString("super")), null);
        } else {
            arg1 = new AJCIdent(make.Ident(names.fromString("super")), null);
        }
    }

    //ARG2: List<JCExpression> args
    List<JCExpression> arg2 = List.<JCExpression>nil();
    if (n.getArgs() != null) {
        for (final Expression e : n.getArgs()) {
            arg2 = arg2.append((JCExpression) e.accept(this, arg));
        }
    }

    // It is expected a Statement, so converting the invocation

    return new AJCExpressionStatement(make.Exec(new AJCMethodInvocation(make.Apply(arg0, arg1, arg2), null)), ((n.getComment() != null) ? n.getComment().getContent() : null));
}
 
开发者ID:pcgomes,项目名称:javaparser2jctree,代码行数:35,代码来源:JavaParser2JCTree.java


注:本文中的com.github.javaparser.ast.stmt.ExplicitConstructorInvocationStmt.getArgs方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。