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


Java AnnotationMemberDeclaration类代码示例

本文整理汇总了Java中com.github.javaparser.ast.body.AnnotationMemberDeclaration的典型用法代码示例。如果您正苦于以下问题:Java AnnotationMemberDeclaration类的具体用法?Java AnnotationMemberDeclaration怎么用?Java AnnotationMemberDeclaration使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


AnnotationMemberDeclaration类属于com.github.javaparser.ast.body包,在下文中一共展示了AnnotationMemberDeclaration类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: visit

import com.github.javaparser.ast.body.AnnotationMemberDeclaration; //导入依赖的package包/类
@Override
public void visit(final AnnotationMemberDeclaration n, final Object arg) {
    printer.printLn("AnnotationMemberDeclaration");
    printJavaComment(n.getComment(), arg);
    printJavadoc(n.getJavaDoc(), arg);
    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(";");
}
 
开发者ID:pcgomes,项目名称:javaparser2jctree,代码行数:19,代码来源:ASTDumpVisitor.java

示例2: visit

import com.github.javaparser.ast.body.AnnotationMemberDeclaration; //导入依赖的package包/类
@Override
  public JCTree visit(final AnnotationMemberDeclaration n, final Object arg) {
       /* TODO - Annotations are not currently supported
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);
   }
}
JCTree result = n.getType().accept(this, arg);
if (n.getDefaultValue() != null) {
      JCTree result = n.getDefaultValue().accept(this, arg);
}
return new AJCAnnotationMemberDeclaration( make.AnnotationMemberDeclaration( ), ( (n.getComment()!=null)?n.getComment().getContent():null ) );
       */
      System.err.println("Assigning null at:" + Thread.currentThread().getStackTrace()[1].getLineNumber());
      return null;
  }
 
开发者ID:pcgomes,项目名称:javaparser2jctree,代码行数:21,代码来源:JavaParser2JCTree.java

示例3: visit

import com.github.javaparser.ast.body.AnnotationMemberDeclaration; //导入依赖的package包/类
@Override public void visit(final AnnotationMemberDeclaration n, final Object arg) {
printJavaComment(n.getComment(), arg);
printJavadoc(n.getJavaDoc(), arg);
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(";");
   }
 
开发者ID:plum-umd,项目名称:java-sketch,代码行数:17,代码来源:DumpVisitor.java

示例4: visit

import com.github.javaparser.ast.body.AnnotationMemberDeclaration; //导入依赖的package包/类
@Override public void visit(final AnnotationMemberDeclaration 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);
        }
    }
    n.getType().accept(this, arg);
    if (n.getDefaultValue() != null) {
        n.getDefaultValue().accept(this, arg);
    }
}
 
开发者ID:plum-umd,项目名称:java-sketch,代码行数:17,代码来源:JsonVisitorAdapter.java

示例5: visit

import com.github.javaparser.ast.body.AnnotationMemberDeclaration; //导入依赖的package包/类
@Override public Node visit(final AnnotationMemberDeclaration 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);
	}
	n.setType((Type) n.getType().accept(this, arg));
	if (n.getDefaultValue() != null) {
		n.setDefaultValue((Expression) n.getDefaultValue().accept(this, arg));
	}
	return n;
}
 
开发者ID:plum-umd,项目名称:java-sketch,代码行数:18,代码来源:ModifierVisitorAdapter.java

示例6: visit

import com.github.javaparser.ast.body.AnnotationMemberDeclaration; //导入依赖的package包/类
@Override public void visit(final AnnotationMemberDeclaration n, final Object arg) {
	printJavaComment(n.getComment(), arg);
	printJavadoc(n.getJavaDoc(), arg);
	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(";");
}
 
开发者ID:javaparser,项目名称:javasymbolsolver,代码行数:17,代码来源:DumpVisitor.java

示例7: doMerge

import com.github.javaparser.ast.body.AnnotationMemberDeclaration; //导入依赖的package包/类
@Override
public AnnotationMemberDeclaration doMerge(AnnotationMemberDeclaration first, AnnotationMemberDeclaration second) {

  AnnotationMemberDeclaration amd = new AnnotationMemberDeclaration();
  amd.setName(first.getName());
  amd.setType(mergeSingle(first.getType(),second.getType()));
  amd.setJavaDoc(mergeSingle(first.getJavaDoc(), second.getJavaDoc()));

  amd.setModifiers(mergeModifiers(first.getModifiers(), second.getModifiers()));
  amd.setAnnotations(mergeCollections(first.getAnnotations(), second.getAnnotations()));
  amd.setDefaultValue(mergeSingle(first.getDefaultValue(), second.getDefaultValue()));

  return amd;
}
 
开发者ID:beihaifeiwu,项目名称:dolphin,代码行数:15,代码来源:AnnotationMemberDeclarationMerger.java

示例8: doIsEquals

import com.github.javaparser.ast.body.AnnotationMemberDeclaration; //导入依赖的package包/类
@Override
public boolean doIsEquals(AnnotationMemberDeclaration first, AnnotationMemberDeclaration second) {

  if (!isEqualsUseMerger(first.getType(), second.getType())) return false;
  if (!first.getName().equals(second.getName())) return false;

  return true;
}
 
开发者ID:beihaifeiwu,项目名称:dolphin,代码行数:9,代码来源:AnnotationMemberDeclarationMerger.java

示例9: visit

import com.github.javaparser.ast.body.AnnotationMemberDeclaration; //导入依赖的package包/类
@Override public Boolean visit(final AnnotationMemberDeclaration n1, final Node arg) {
	final AnnotationMemberDeclaration n2 = (AnnotationMemberDeclaration) arg;

	// javadoc are checked at CompilationUnit

	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;
}
 
开发者ID:plum-umd,项目名称:java-sketch,代码行数:28,代码来源:EqualsVisitor.java

示例10: visit

import com.github.javaparser.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);
	Comment comment = cloneNodes(_n.getComment(), _arg);

	AnnotationMemberDeclaration r = new AnnotationMemberDeclaration(
			_n.getBeginLine(), _n.getBeginColumn(), _n.getEndLine(), _n.getEndColumn(),
			 _n.getModifiers(), annotations, type_, _n.getName(), defaultValue
	);
	r.setComment(comment);
	return r;
}
 
开发者ID:plum-umd,项目名称:java-sketch,代码行数:16,代码来源:CloneVisitor.java

示例11: visit

import com.github.javaparser.ast.body.AnnotationMemberDeclaration; //导入依赖的package包/类
@Override public void visit(final AnnotationMemberDeclaration 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);
		}
	}
	n.getType().accept(this, arg);
	if (n.getDefaultValue() != null) {
		n.getDefaultValue().accept(this, arg);
	}
}
 
开发者ID:plum-umd,项目名称:java-sketch,代码行数:16,代码来源:VoidVisitorAdapter.java

示例12: visit

import com.github.javaparser.ast.body.AnnotationMemberDeclaration; //导入依赖的package包/类
@Override public Boolean visit(final AnnotationMemberDeclaration n1, final Node arg) {
	final AnnotationMemberDeclaration n2 = (AnnotationMemberDeclaration) arg;

	// javadoc are checked at CompilationUnit

       if (!n1.getModifiers().equals(n2.getModifiers())) {
		return false;
	}

	if (!objEquals(n1.getName(), n2.getName())) {
		return false;
	}

	if (!nodesEquals(n1.getAnnotations(), n2.getAnnotations())) {
		return false;
	}

	if (!nodeEquals(n1.getDefaultValue(), n2.getDefaultValue())) {
		return false;
	}

	if (!nodeEquals(n1.getType(), n2.getType())) {
		return false;
	}

	return true;
}
 
开发者ID:javaparser,项目名称:javasymbolsolver,代码行数:28,代码来源:EqualsVisitor.java

示例13: visit

import com.github.javaparser.ast.body.AnnotationMemberDeclaration; //导入依赖的package包/类
@Override
public Node visit(AnnotationMemberDeclaration _n, Object _arg) {
	List<AnnotationExpr> annotations = visit(_n.getAnnotations(), _arg);
	Type<?> type_ = cloneNodes(_n.getType(), _arg);
	Expression defaultValue = cloneNodes(_n.getDefaultValue(), _arg);
	Comment comment = cloneNodes(_n.getComment(), _arg);

	AnnotationMemberDeclaration r = new AnnotationMemberDeclaration(
			_n.getRange(),
			 _n.getModifiers(), annotations, type_, _n.getName(), defaultValue
	);
	r.setComment(comment);
	return r;
}
 
开发者ID:javaparser,项目名称:javasymbolsolver,代码行数:15,代码来源:CloneVisitor.java

示例14: visit

import com.github.javaparser.ast.body.AnnotationMemberDeclaration; //导入依赖的package包/类
@Override public void visit(final AnnotationMemberDeclaration n, final A arg) {
	visitComment(n.getComment(), arg);
	visitAnnotations(n, arg);
	n.getType().accept(this, arg);
	if (n.getDefaultValue() != null) {
		n.getDefaultValue().accept(this, arg);
	}
}
 
开发者ID:javaparser,项目名称:javasymbolsolver,代码行数:9,代码来源:VoidVisitorAdapter.java

示例15: visit

import com.github.javaparser.ast.body.AnnotationMemberDeclaration; //导入依赖的package包/类
@Override public Node visit(final AnnotationMemberDeclaration 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);
	}
	n.setType((Type) n.getType().accept(this, arg));
	if (n.getDefaultValue() != null) {
		n.setDefaultValue((Expression) n.getDefaultValue().accept(this, arg));
	}
	return n;
}
 
开发者ID:javaparser,项目名称:javasymbolsolver,代码行数:16,代码来源:ModifierVisitorAdapter.java


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