本文整理汇总了Java中com.github.javaparser.ast.stmt.TypeDeclarationStmt类的典型用法代码示例。如果您正苦于以下问题:Java TypeDeclarationStmt类的具体用法?Java TypeDeclarationStmt怎么用?Java TypeDeclarationStmt使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TypeDeclarationStmt类属于com.github.javaparser.ast.stmt包,在下文中一共展示了TypeDeclarationStmt类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: visit
import com.github.javaparser.ast.stmt.TypeDeclarationStmt; //导入依赖的package包/类
@Override
public JCTree visit(final TypeDeclarationStmt n, final Object arg) {
/* TODO - Must figure out how to return a type declaration as a statement
JCTree result = n.getTypeDeclaration().accept(this, arg);
return new AJCTypeDeclaration( make.ClassDef( ), ( (n.getComment()!=null)?n.getComment().getContent():null ) );
*/
System.err.println("Assigning null at:" + Thread.currentThread().getStackTrace()[1].getLineNumber());
return null;
}
开发者ID:pcgomes,项目名称:javaparser2jctree,代码行数:10,代码来源:JavaParser2JCTree.java
示例2: visit
import com.github.javaparser.ast.stmt.TypeDeclarationStmt; //导入依赖的package包/类
@Override
public R visit(final TypeDeclarationStmt n, final A arg) {
{
R result = n.getTypeDeclaration().accept(this, arg);
if (result != null) {
return result;
}
}
return null;
}
开发者ID:plum-umd,项目名称:java-sketch,代码行数:11,代码来源:GenericVisitorAdapter.java
示例3: visit
import com.github.javaparser.ast.stmt.TypeDeclarationStmt; //导入依赖的package包/类
@Override public Boolean visit(final TypeDeclarationStmt n1, final Node arg) {
final TypeDeclarationStmt n2 = (TypeDeclarationStmt) arg;
if (!nodeEquals(n1.getTypeDeclaration(), n2.getTypeDeclaration())) {
return Boolean.FALSE;
}
return Boolean.TRUE;
}
开发者ID:plum-umd,项目名称:java-sketch,代码行数:10,代码来源:EqualsVisitor.java
示例4: visit
import com.github.javaparser.ast.stmt.TypeDeclarationStmt; //导入依赖的package包/类
@Override public Boolean visit(final TypeDeclarationStmt n1, final Node arg) {
final TypeDeclarationStmt n2 = (TypeDeclarationStmt) arg;
if (!nodeEquals(n1.getTypeDeclaration(), n2.getTypeDeclaration())) {
return false;
}
return true;
}
开发者ID:javaparser,项目名称:javasymbolsolver,代码行数:10,代码来源:EqualsVisitor.java
示例5: visit
import com.github.javaparser.ast.stmt.TypeDeclarationStmt; //导入依赖的package包/类
@Override
public Node visit(TypeDeclarationStmt _n, Object _arg) {
TypeDeclaration<?> typeDecl = cloneNodes(_n.getTypeDeclaration(), _arg);
Comment comment = cloneNodes(_n.getComment(), _arg);
TypeDeclarationStmt r = new TypeDeclarationStmt(
_n.getRange(),
typeDecl
);
r.setComment(comment);
return r;
}
开发者ID:javaparser,项目名称:javasymbolsolver,代码行数:13,代码来源:CloneVisitor.java
示例6: visit
import com.github.javaparser.ast.stmt.TypeDeclarationStmt; //导入依赖的package包/类
@Override
public Node visit(
TypeDeclarationStmt n, Map<Node, Node> arg
) {
if (arg.containsKey(n)) {
return arg.get(n);
}
return super.visit(n, arg);
}
开发者ID:WeTheInternet,项目名称:xapi,代码行数:10,代码来源:ConcreteModifierVisitor.java
示例7: getTypeName
import com.github.javaparser.ast.stmt.TypeDeclarationStmt; //导入依赖的package包/类
@Nonnull
public static String getTypeName(@Nonnull Node node) {
List<Node> anonymousClasses = newArrayList();
StringBuilder buffy = new StringBuilder();
Node loopNode = node;
for (; ; ) {
if (ObjectCreationExpr.class.isInstance(loopNode)) {
if (!isEmpty(ObjectCreationExpr.class.cast(loopNode).getAnonymousClassBody())) {
anonymousClasses.add(loopNode);
}
} else if (TypeDeclarationStmt.class.isInstance(loopNode)) {
anonymousClasses.add(loopNode);
} else if (TypeDeclaration.class.isInstance(loopNode)
&& !TypeDeclarationStmt.class.isInstance(loopNode.getParentNode())) {
TypeDeclaration typeDeclaration = TypeDeclaration.class.cast(loopNode);
prependSeparatorIfNecessary('$', buffy).insert(0, typeDeclaration.getName());
appendAnonymousClasses(anonymousClasses, typeDeclaration, buffy);
} else if (CompilationUnit.class.isInstance(loopNode)) {
if (buffy.length() == 0) {
buffy.append("package-info");
}
final CompilationUnit compilationUnit = CompilationUnit.class.cast(loopNode);
if (compilationUnit.getPackage() != null) {
prepend(compilationUnit.getPackage().getName(), buffy);
}
}
loopNode = loopNode.getParentNode();
if (loopNode == null) {
return buffy.toString();
}
}
}
开发者ID:ImmobilienScout24,项目名称:deadcode4j,代码行数:33,代码来源:Nodes.java
示例8: visit
import com.github.javaparser.ast.stmt.TypeDeclarationStmt; //导入依赖的package包/类
@Override
public void visit(TypeDeclarationStmt n, Script arg) {
}
开发者ID:Nosorog,项目名称:nosorog-core,代码行数:4,代码来源:NoOpVisitor.java
示例9: visit
import com.github.javaparser.ast.stmt.TypeDeclarationStmt; //导入依赖的package包/类
@Override
public void visit(final TypeDeclarationStmt n, final Object arg) {
printer.printLn("TypeDeclarationStmt");
printJavaComment(n.getComment(), arg);
n.getTypeDeclaration().accept(this, arg);
}
开发者ID:pcgomes,项目名称:javaparser2jctree,代码行数:7,代码来源:ASTDumpVisitor.java
示例10: doMerge
import com.github.javaparser.ast.stmt.TypeDeclarationStmt; //导入依赖的package包/类
@Override public TypeDeclarationStmt doMerge(TypeDeclarationStmt first, TypeDeclarationStmt second) {
TypeDeclarationStmt tds = new TypeDeclarationStmt();
tds.setTypeDeclaration(mergeSingle(first.getTypeDeclaration(),second.getTypeDeclaration()));
return tds;
}
开发者ID:beihaifeiwu,项目名称:dolphin,代码行数:6,代码来源:TypeDeclarationStmtMerger.java
示例11: visit
import com.github.javaparser.ast.stmt.TypeDeclarationStmt; //导入依赖的package包/类
@Override public void visit(final TypeDeclarationStmt n, final Object arg) {
printJavaComment(n.getComment(), arg);
n.getTypeDeclaration().accept(this, arg);
}
开发者ID:plum-umd,项目名称:java-sketch,代码行数:5,代码来源:DumpVisitor.java
示例12: visit
import com.github.javaparser.ast.stmt.TypeDeclarationStmt; //导入依赖的package包/类
@Override public void visit(final TypeDeclarationStmt n, final A arg) {
visitComment(n.getComment(), arg);
n.getTypeDeclaration().accept(this, arg);
}
开发者ID:plum-umd,项目名称:java-sketch,代码行数:5,代码来源:VoidVisitorAdapter.java
示例13: visit
import com.github.javaparser.ast.stmt.TypeDeclarationStmt; //导入依赖的package包/类
@Override public void visit(final TypeDeclarationStmt n, final A arg) {
jw.write(n);
visitComment(n.getComment(), arg);
n.getTypeDeclaration().accept(this, arg);
}
开发者ID:plum-umd,项目名称:java-sketch,代码行数:6,代码来源:JsonVisitorAdapter.java
示例14: visit
import com.github.javaparser.ast.stmt.TypeDeclarationStmt; //导入依赖的package包/类
@Override public Node visit(final TypeDeclarationStmt n, final A arg) {
n.setTypeDeclaration((TypeDeclaration) n.getTypeDeclaration().accept(this, arg));
return n;
}
开发者ID:plum-umd,项目名称:java-sketch,代码行数:5,代码来源:ModifierVisitorAdapter.java
示例15: visit
import com.github.javaparser.ast.stmt.TypeDeclarationStmt; //导入依赖的package包/类
@Override public Node visit(final TypeDeclarationStmt n, final A arg) {
visitComment(n, arg);
n.setTypeDeclaration((TypeDeclaration<?>) n.getTypeDeclaration().accept(this, arg));
return n;
}
开发者ID:javaparser,项目名称:javasymbolsolver,代码行数:6,代码来源:ModifierVisitorAdapter.java
示例16: visit
import com.github.javaparser.ast.stmt.TypeDeclarationStmt; //导入依赖的package包/类
@Override public void visit(final TypeDeclarationStmt n, final Object arg) {
printJavaComment(n.getComment(), arg);
n.getTypeDeclaration().accept(this, arg);
}
开发者ID:javaparser,项目名称:javasymbolsolver,代码行数:5,代码来源:DumpVisitor.java
示例17: visit
import com.github.javaparser.ast.stmt.TypeDeclarationStmt; //导入依赖的package包/类
@Override
public void visit(final TypeDeclarationStmt n, final Context ctx) {
visitNode(n, ctx);
super.visit(n, ctx);
}
开发者ID:jooby-project,项目名称:jooby,代码行数:7,代码来源:LocalVariableCollector.java
示例18: doIsEquals
import com.github.javaparser.ast.stmt.TypeDeclarationStmt; //导入依赖的package包/类
@Override public boolean doIsEquals(TypeDeclarationStmt first, TypeDeclarationStmt second) {
if(!isEqualsUseMerger(first.getTypeDeclaration(),second.getTypeDeclaration())) return false;
return true;
}
开发者ID:beihaifeiwu,项目名称:dolphin,代码行数:7,代码来源:TypeDeclarationStmtMerger.java
示例19: visit
import com.github.javaparser.ast.stmt.TypeDeclarationStmt; //导入依赖的package包/类
public R visit(TypeDeclarationStmt n, A arg);
开发者ID:plum-umd,项目名称:java-sketch,代码行数:2,代码来源:GenericVisitor.java
示例20: visit
import com.github.javaparser.ast.stmt.TypeDeclarationStmt; //导入依赖的package包/类
void visit(TypeDeclarationStmt n, A arg);
开发者ID:plum-umd,项目名称:java-sketch,代码行数:2,代码来源:VoidVisitor.java
注:本文中的com.github.javaparser.ast.stmt.TypeDeclarationStmt类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论