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


Java JavadocComment类代码示例

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


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

示例1: visit

import com.github.javaparser.ast.comments.JavadocComment; //导入依赖的package包/类
@Override
public Node visit(EnumDeclaration _n, Object _arg) {
	JavadocComment javaDoc = cloneNodes(_n.getJavaDoc(), _arg);
	List<AnnotationExpr> annotations = visit(_n.getAnnotations(), _arg);
	List<ClassOrInterfaceType> implementsList = visit(_n.getImplements(), _arg);
	List<EnumConstantDeclaration> entries = visit(_n.getEntries(), _arg);
	List<BodyDeclaration> members = visit(_n.getMembers(), _arg);
	Comment comment = cloneNodes(_n.getComment(), _arg);

	EnumDeclaration r = new EnumDeclaration(
			_n.getBeginLine(), _n.getBeginColumn(), _n.getEndLine(), _n.getEndColumn(),
			 _n.getModifiers(), annotations, _n.getName(), implementsList, entries, members
	);
	r.setComment(comment);
	return r;
}
 
开发者ID:javaparser,项目名称:javasymbolsolver,代码行数:17,代码来源:CloneVisitor.java

示例2: visit

import com.github.javaparser.ast.comments.JavadocComment; //导入依赖的package包/类
@Override public Node visit(final AnnotationDeclaration 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<BodyDeclaration> members = n.getMembers();
	if (members != null) {
		for (int i = 0; i < members.size(); i++) {
			members.set(i, (BodyDeclaration) members.get(i).accept(this, arg));
		}
		removeNulls(members);
	}
	return n;
}
 
开发者ID:plum-umd,项目名称:java-sketch,代码行数:21,代码来源:ModifierVisitorAdapter.java

示例3: visit

import com.github.javaparser.ast.comments.JavadocComment; //导入依赖的package包/类
@Override public Node visit(final FieldDeclaration 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));
	final List<VariableDeclarator> variables = n.getVariables();
	for (int i = 0; i < variables.size(); i++) {
		variables.set(i, (VariableDeclarator) variables.get(i).accept(this, arg));
	}
	removeNulls(variables);
	return n;
}
 
开发者ID:javaparser,项目名称:javasymbolsolver,代码行数:20,代码来源:ModifierVisitorAdapter.java

示例4: visit

import com.github.javaparser.ast.comments.JavadocComment; //导入依赖的package包/类
@Override
public void visit(JavadocComment n, Void arg) {
	if (configuration.isIgnoreComments()) return;

	printer.print("/**");
	printMultiLine(n.getContent());
	printer.println("*/");
}
 
开发者ID:sfPlayer1,项目名称:Matcher,代码行数:9,代码来源:SrcRemapper.java

示例5: visit

import com.github.javaparser.ast.comments.JavadocComment; //导入依赖的package包/类
@Override
public void visit(final ClassOrInterfaceDeclaration n, final Void arg) {
    extnds = n.getExtends().toString();

    final Comment c = n.getComment();
    if (c instanceof JavadocComment) {
        javadoc = c.toString();
    }

    super.visit(n, arg);
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:12,代码来源:SieASTVisitor.java

示例6: visit

import com.github.javaparser.ast.comments.JavadocComment; //导入依赖的package包/类
@Override
public void visit(final MethodDeclaration n, final Void arg) {
    final String signature = n.getDeclarationAsString(false, false);

    methods.add(signature);

    final Comment c = n.getComment();
    if (c instanceof JavadocComment) {
        methodJavadoc.put(signature, c.toString());
    }
    super.visit(n, arg);
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:13,代码来源:MbeASTVisitor.java

示例7: description

import com.github.javaparser.ast.comments.JavadocComment; //导入依赖的package包/类
private static String description(JavadocComment comment) {
    if (comment == null) {
        return "";
    }
    String[] lines = comment.toString().split("\n");
    return stream(lines).skip(1L).limit(lines.length - 2L).map(WikiGenerator::removeStars).collect(joining("\n", "", "\n"));
}
 
开发者ID:theangrydev,项目名称:business-flows,代码行数:8,代码来源:WikiGenerator.java

示例8: visit

import com.github.javaparser.ast.comments.JavadocComment; //导入依赖的package包/类
@Override
public void visit(final JavadocComment n, final Object arg) {
    printer.printLn("JavadocComment");
    printer.print("/**");
    printer.print(n.getContent());
    printer.printLn("*/");
}
 
开发者ID:pcgomes,项目名称:javaparser2jctree,代码行数:8,代码来源:ASTDumpVisitor.java

示例9: visit

import com.github.javaparser.ast.comments.JavadocComment; //导入依赖的package包/类
@Override
  public JCTree visit(final JavadocComment n, final Object arg) {
       /* TODO - Not processing Javadoc
return new AJCJavadocComment( make.JavadocComment( ), ( (n.getComment()!=null)?n.getComment().getContent():null ) );
       */
      System.err.println("Assigning null at:" + Thread.currentThread().getStackTrace()[1].getLineNumber());
      return null;
  }
 
开发者ID:pcgomes,项目名称:javaparser2jctree,代码行数:9,代码来源:JavaParser2JCTree.java

示例10: doMerge

import com.github.javaparser.ast.comments.JavadocComment; //导入依赖的package包/类
@Override
public JavadocComment doMerge(JavadocComment first, JavadocComment second) {
  JavadocComment comment = new JavadocComment();

  if(first.getContent().length() > second.getContent().length()){
    comment.setContent(first.getContent());
    copyPosition(first,comment);
  }else {
    comment.setContent(second.getContent());
    copyPosition(second,comment);
  }

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

示例11: Operation

import com.github.javaparser.ast.comments.JavadocComment; //导入依赖的package包/类
/**
 * Constructs an Operation
 *
 * @param collector     The collection of default values.
 * @param definedMethod The method that this operation is wrapping
 * @param className     The name of the class being generated
 */
public Operation(DefaultValueCollector collector, DefinedMethod definedMethod, String className) {
  this.definedMethod = definedMethod;
  this.packageDec = new PackageDeclaration(new NameExpr("edu.wpi.grip.generated." + className));
  this.operationParams = this.definedMethod.getFinalizedParamTypes(collector);
  this.socketHintDeclarationCollection = new SocketHintDeclarationCollection(collector, this
      .operationParams);
  this.javadocComment = new JavadocComment(" Operation to call " +
      "{@link " + className + "#" + definedMethod.getMethodName() + "} ");

}
 
开发者ID:WPIRoboticsProjects,项目名称:GRIP,代码行数:18,代码来源:Operation.java

示例12: getJavaDoc

import com.github.javaparser.ast.comments.JavadocComment; //导入依赖的package包/类
@Override
public JavadocComment getJavaDoc() {
	if(getComment() instanceof JavadocComment){
		return (JavadocComment) getComment();
	}
	return null;
}
 
开发者ID:javaparser,项目名称:javasymbolsolver,代码行数:8,代码来源:TypeDeclaration.java

示例13: getJavaDoc

import com.github.javaparser.ast.comments.JavadocComment; //导入依赖的package包/类
@Override
public JavadocComment getJavaDoc() {
    if(getComment() instanceof JavadocComment){
        return (JavadocComment) getComment();
    }
    return null;
}
 
开发者ID:javaparser,项目名称:javasymbolsolver,代码行数:8,代码来源:EmptyMemberDeclaration.java

示例14: getJavaDoc

import com.github.javaparser.ast.comments.JavadocComment; //导入依赖的package包/类
@Override
public JavadocComment getJavaDoc() {
    if (getComment() instanceof JavadocComment) {
        return (JavadocComment) getComment();
    }
    return null;
}
 
开发者ID:javaparser,项目名称:javasymbolsolver,代码行数:8,代码来源:ConstructorDeclaration.java

示例15: visit

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

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

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


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