本文整理汇总了Java中com.github.javaparser.ast.comments.BlockComment类的典型用法代码示例。如果您正苦于以下问题:Java BlockComment类的具体用法?Java BlockComment怎么用?Java BlockComment使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
BlockComment类属于com.github.javaparser.ast.comments包,在下文中一共展示了BlockComment类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getClassDeclaration
import com.github.javaparser.ast.comments.BlockComment; //导入依赖的package包/类
/**
* Generates the class definition for the Operation
*/
private ClassOrInterfaceDeclaration getClassDeclaration() {
ClassOrInterfaceDeclaration operation = new ClassOrInterfaceDeclaration(ModifierSet.PUBLIC,
false, getOperationClassName());
operation.setImplements(Collections.singletonList(iOperation));
operation.setJavaDoc(javadocComment);
operation.setComment(new BlockComment(
" * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n"
+ " * ===== THIS CODE HAS BEEN DYNAMICALLY GENERATED! DO NOT MODIFY! ==== *\n"
+ " * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * "));
operation.setMembers(socketHintDeclarationCollection
.getAllSocketHints()
.stream()
.map(SocketHintDeclaration::getDeclaration)
.filter(declaration -> declaration != null)
.collect(Collectors.toList()));
ASTHelper.addMember(operation, getNameMethod());
ASTHelper.addMember(operation, getDescriptionMethod());
ASTHelper.addMember(operation, getCategoryMethod());
ASTHelper.addMember(operation, getCreateInputSocketsMethod());
ASTHelper.addMember(operation, getCreateOutputSocketsMethod());
ASTHelper.addMember(operation, getPerformMethod());
return operation;
}
示例2: visit
import com.github.javaparser.ast.comments.BlockComment; //导入依赖的package包/类
@Override
public void visit(BlockComment n, Void arg) {
if (configuration.isIgnoreComments()) return;
printer.print("/*");
printMultiLine(n.getContent());
printer.println("*/");
}
示例3: visit
import com.github.javaparser.ast.comments.BlockComment; //导入依赖的package包/类
@Override public void visit(final BlockComment n, final Object arg) {
if (!this.printComments) {
return;
}
printer.print("/*");
printer.print(n.getContent());
printer.printLn("*/");
}
示例4: visit
import com.github.javaparser.ast.comments.BlockComment; //导入依赖的package包/类
@Override
public void visit(final BlockComment n, final Object arg) {
printer.printLn("BlockComment");
if (!this.printComments) {
return;
}
printer.print("/*");
printer.print(n.getContent());
printer.printLn("*/");
}
示例5: visit
import com.github.javaparser.ast.comments.BlockComment; //导入依赖的package包/类
@Override
public JCTree visit(final BlockComment n, final Object arg) {
/* Doesn't have to visit the comment at this point
return new AJCBlockComment( make.BlockComment( ), ( (n.getComment()!=null)?n.getComment().getContent():null ) );
*/
System.err.println("Assigning null at:" + Thread.currentThread().getStackTrace()[1].getLineNumber());
return null;
}
示例6: doMerge
import com.github.javaparser.ast.comments.BlockComment; //导入依赖的package包/类
@Override
public BlockComment doMerge(BlockComment first, BlockComment second) {
if(StringUtils.isBlank(first.getContent())) return second;
if(StringUtils.isBlank(second.getContent())) return first;
BlockComment comment = new BlockComment();
comment.setContent(first.getContent());
copyPosition(first,comment);
return comment;
}
示例7: visit
import com.github.javaparser.ast.comments.BlockComment; //导入依赖的package包/类
@Override public Boolean visit(final BlockComment n1, final Node arg) {
final BlockComment n2 = (BlockComment) arg;
if (!objEquals(n1.getContent(), n2.getContent())) {
return Boolean.FALSE;
}
if (!objEquals(n1.getBeginLine(), n2.getBeginLine())) {
return Boolean.FALSE;
}
return Boolean.TRUE;
}
示例8: visit
import com.github.javaparser.ast.comments.BlockComment; //导入依赖的package包/类
@Override public void visit(final BlockComment n, final Object arg) {
if (!this.printComments) {
return;
}
printer.print("/*");
printer.print(n.getContent());
printer.printLn("*/");
}
示例9: visit
import com.github.javaparser.ast.comments.BlockComment; //导入依赖的package包/类
@Override public Boolean visit(final BlockComment n1, final Node arg) {
final BlockComment n2 = (BlockComment) arg;
if (!objEquals(n1.getContent(), n2.getContent())) {
return false;
}
if (!objEquals(n1.getBegin().line, n2.getBegin().line)) {
return false;
}
return true;
}
示例10: visit
import com.github.javaparser.ast.comments.BlockComment; //导入依赖的package包/类
@Override
public void visit(final BlockComment n, final Object arg) {
if (!this.printComments) {
return;
}
printer.print("/*");
printer.print(n.getContent());
printer.printLn("*/");
}
示例11: visit
import com.github.javaparser.ast.comments.BlockComment; //导入依赖的package包/类
@Override public void visit(final BlockComment n, final Object arg) {
if (!this.printComments) {
return;
}
printer.print("/*");
printer.print(n.getContent());
printer.printLn("*/");
}
示例12: visit
import com.github.javaparser.ast.comments.BlockComment; //导入依赖的package包/类
@Override
public void visit(final BlockComment n, final Object arg) {
if (!this.printComments) {
return;
}
printer.print("/*");
printer.print(n.getContent());
printer.println("*/");
}
示例13: visit
import com.github.javaparser.ast.comments.BlockComment; //导入依赖的package包/类
@Override
public Node visit(
BlockComment n, Map<Node, Node> arg
) {
if (arg.containsKey(n)) {
return arg.get(n);
}
return super.visit(n, arg);
}
示例14: visit
import com.github.javaparser.ast.comments.BlockComment; //导入依赖的package包/类
@Override
public void visit(BlockComment n, Script arg) {
}
示例15: doIsEquals
import com.github.javaparser.ast.comments.BlockComment; //导入依赖的package包/类
@Override
public boolean doIsEquals(BlockComment first, BlockComment second) {
return similarity(first.getContent(),second.getContent()) > 0.9d;
}