本文整理汇总了Java中japa.parser.ast.TypeParameter类的典型用法代码示例。如果您正苦于以下问题:Java TypeParameter类的具体用法?Java TypeParameter怎么用?Java TypeParameter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TypeParameter类属于japa.parser.ast包,在下文中一共展示了TypeParameter类的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: visit
import japa.parser.ast.TypeParameter; //导入依赖的package包/类
public void visit(ConstructorDeclaration n, A arg) {
if (n.getJavaDoc() != null) {
n.getJavaDoc().accept(this, arg);
}
if (n.getAnnotations() != null) {
for (AnnotationExpr a : n.getAnnotations()) {
a.accept(this, arg);
}
}
if (n.getTypeParameters() != null) {
for (TypeParameter t : n.getTypeParameters()) {
t.accept(this, arg);
}
}
if (n.getParameters() != null) {
for (Parameter p : n.getParameters()) {
p.accept(this, arg);
}
}
if (n.getThrows() != null) {
for (NameExpr name : n.getThrows()) {
name.accept(this, arg);
}
}
n.getBlock().accept(this, arg);
}
开发者ID:rfw,项目名称:genja,代码行数:27,代码来源:VoidVisitorAdapter.java
示例2: visit
import japa.parser.ast.TypeParameter; //导入依赖的package包/类
@Override
public void visit(ConstructorDeclaration n, Object arg)
{ String prevMethod = currentMethod;
currentMethod = n.getName();
indentLevel++;
if (n.getJavaDoc() != null)
{ n.getJavaDoc().accept(this, arg);
}
if(n.getAnnotations() != null)
{ for (AnnotationExpr a : n.getAnnotations())
{ a.accept(this, arg);
}
}
if(n.getTypeParameters() != null)
{ for (TypeParameter t : n.getTypeParameters())
{ t.accept(this, arg);
}
}
if(n.getParameters() != null)
{ for (Parameter p : n.getParameters())
{ p.accept(this, arg);
}
}
if(n.getThrows() != null)
{ for (NameExpr name : n.getThrows())
{ name.accept(this, arg);
}
}
BlockStmt block = n.getBlock();
for(int i=0;i<indentLevel;i++)
System.out.print("..");
System.out.println("Analyse du constructeur "+currentMethod);
if(checkConstructor)
checkBlock(block);
block.accept(this, arg);
currentMethod = prevMethod;
indentLevel--;
}
开发者ID:vlabatut,项目名称:totalboumboum,代码行数:41,代码来源:AiVisitor.java
示例3: ClassOrInterfaceDeclaration
import japa.parser.ast.TypeParameter; //导入依赖的package包/类
public ClassOrInterfaceDeclaration(JavadocComment javaDoc, int modifiers, List<AnnotationExpr> annotations, boolean isInterface, String name, List<TypeParameter> typeParameters, List<ClassOrInterfaceType> extendsList, List<ClassOrInterfaceType> implementsList, List<BodyDeclaration> members) {
super(annotations, javaDoc, modifiers, name, members);
this.interface_ = isInterface;
this.typeParameters = typeParameters;
this.extendsList = extendsList;
this.implementsList = implementsList;
}
开发者ID:rfw,项目名称:genja,代码行数:8,代码来源:ClassOrInterfaceDeclaration.java
示例4: ConstructorDeclaration
import japa.parser.ast.TypeParameter; //导入依赖的package包/类
public ConstructorDeclaration(JavadocComment javaDoc, int modifiers, List<AnnotationExpr> annotations, List<TypeParameter> typeParameters, String name, List<Parameter> parameters, List<NameExpr> throws_, BlockStmt block) {
super(annotations, javaDoc);
this.modifiers = modifiers;
this.typeParameters = typeParameters;
this.name = name;
this.parameters = parameters;
this.throws_ = throws_;
this.block = block;
}
开发者ID:rfw,项目名称:genja,代码行数:10,代码来源:ConstructorDeclaration.java
示例5: MethodDeclaration
import japa.parser.ast.TypeParameter; //导入依赖的package包/类
public MethodDeclaration(JavadocComment javaDoc, int modifiers, List<AnnotationExpr> annotations, List<TypeParameter> typeParameters, Type type, String name, List<Parameter> parameters, int arrayCount, List<NameExpr> throws_, boolean generator, BlockStmt block) {
super(annotations, javaDoc);
this.modifiers = modifiers;
this.typeParameters = typeParameters;
this.type = type;
this.name = name;
this.parameters = parameters;
this.arrayCount = arrayCount;
this.throws_ = throws_;
this.generator = generator;
this.body = block;
}
开发者ID:rfw,项目名称:genja,代码行数:13,代码来源:MethodDeclaration.java
示例6: visit
import japa.parser.ast.TypeParameter; //导入依赖的package包/类
public R visit(ConstructorDeclaration n, A arg) {
if (n.getJavaDoc() != null) {
n.getJavaDoc().accept(this, arg);
}
if (n.getAnnotations() != null) {
for (AnnotationExpr a : n.getAnnotations()) {
a.accept(this, arg);
}
}
if (n.getTypeParameters() != null) {
for (TypeParameter t : n.getTypeParameters()) {
t.accept(this, arg);
}
}
if (n.getParameters() != null) {
for (Parameter p : n.getParameters()) {
p.accept(this, arg);
}
}
if (n.getThrows() != null) {
for (NameExpr name : n.getThrows()) {
name.accept(this, arg);
}
}
n.getBlock().accept(this, arg);
return null;
}
开发者ID:rfw,项目名称:genja,代码行数:28,代码来源:GenericVisitorAdapter.java
示例7: visit
import japa.parser.ast.TypeParameter; //导入依赖的package包/类
public Boolean visit(TypeParameter n1, Node arg) {
TypeParameter n2 = (TypeParameter) arg;
if (!objEquals(n1.getName(), n2.getName())) {
return Boolean.FALSE;
}
if (!nodesEquals(n1.getTypeBound(), n2.getTypeBound())) {
return Boolean.FALSE;
}
return Boolean.TRUE;
}
开发者ID:rfw,项目名称:genja,代码行数:14,代码来源:EqualsVisitor.java
示例8: printTypeParameters
import japa.parser.ast.TypeParameter; //导入依赖的package包/类
private void printTypeParameters(List<TypeParameter> args, Object arg) {
if (args != null) {
printer.print("<");
for (Iterator<TypeParameter> i = args.iterator(); i.hasNext();) {
TypeParameter t = i.next();
t.accept(this, arg);
if (i.hasNext()) {
printer.print(", ");
}
}
printer.print(">");
}
}
开发者ID:rfw,项目名称:genja,代码行数:14,代码来源:DumpVisitor.java
示例9: visit
import japa.parser.ast.TypeParameter; //导入依赖的package包/类
public void visit(TypeParameter n, Object arg) {
printer.print(n.getName());
if (n.getTypeBound() != null) {
printer.print(" extends ");
for (Iterator<ClassOrInterfaceType> i = n.getTypeBound().iterator(); i.hasNext();) {
ClassOrInterfaceType c = i.next();
c.accept(this, arg);
if (i.hasNext()) {
printer.print(" & ");
}
}
}
}
开发者ID:rfw,项目名称:genja,代码行数:14,代码来源:DumpVisitor.java
示例10: visit
import japa.parser.ast.TypeParameter; //导入依赖的package包/类
public Node visit(ConstructorDeclaration n, A arg) {
if (n.getJavaDoc() != null) {
n.setJavaDoc((JavadocComment) n.getJavaDoc().accept(this, arg));
}
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);
}
List<TypeParameter> typeParameters = n.getTypeParameters();
if (typeParameters != null) {
for (int i = 0; i < typeParameters.size(); i++) {
typeParameters.set(i, (TypeParameter) typeParameters.get(i).accept(this, arg));
}
removeNulls(typeParameters);
}
List<Parameter> parameters = n.getParameters();
if (parameters != null) {
for (int i = 0; i < parameters.size(); i++) {
parameters.set(i, (Parameter) parameters.get(i).accept(this, arg));
}
removeNulls(parameters);
}
List<NameExpr> throwz = n.getThrows();
if (throwz != null) {
for (int i = 0; i < throwz.size(); i++) {
throwz.set(i, (NameExpr) throwz.get(i).accept(this, arg));
}
removeNulls(throwz);
}
n.setBlock((BlockStmt) n.getBlock().accept(this, arg));
return n;
}
开发者ID:rfw,项目名称:genja,代码行数:36,代码来源:ModifierVisitorAdapter.java
示例11: visit
import japa.parser.ast.TypeParameter; //导入依赖的package包/类
@Override
public void visit(ConstructorDeclaration n, Object arg)
{ String prevMethod = currentMethod;
currentMethod = n.getName();
indentLevel++;
if(currentMethod.equals("PathFinder"))
System.out.println();
if (n.getJavaDoc() != null)
{ n.getJavaDoc().accept(this, arg);
}
if(n.getAnnotations() != null)
{ for (AnnotationExpr a : n.getAnnotations())
{ a.accept(this, arg);
}
}
if(n.getTypeParameters() != null)
{ for (TypeParameter t : n.getTypeParameters())
{ t.accept(this, arg);
}
}
if(n.getParameters() != null)
{ for (Parameter p : n.getParameters())
{ p.accept(this, arg);
}
}
if(n.getThrows() != null)
{ for (NameExpr name : n.getThrows())
{ name.accept(this, arg);
}
}
BlockStmt block = n.getBlock();
for(int i=0;i<indentLevel;i++)
System.out.print("..");
System.out.println("Analyse du constructeur "+currentMethod);
if(checkConstructor)
checkBlock(block);
block.accept(this, arg);
currentMethod = prevMethod;
indentLevel--;
}
开发者ID:vlabatut,项目名称:totalboumboum,代码行数:42,代码来源:AiVisitor.java
示例12: visit
import japa.parser.ast.TypeParameter; //导入依赖的package包/类
@Override
public void visit(TypeParameter n, Generator arg) {
throw new TransformException("don't know how to linearize");
}
开发者ID:rfw,项目名称:genja,代码行数:5,代码来源:LinearizeTransform.java
示例13: visit
import japa.parser.ast.TypeParameter; //导入依赖的package包/类
@Override
public Boolean visit(TypeParameter n, Void arg) {
return false;
}
开发者ID:rfw,项目名称:genja,代码行数:5,代码来源:NodeAnnotator.java
示例14: visit
import japa.parser.ast.TypeParameter; //导入依赖的package包/类
@Override
public void visit(TypeParameter n, Scope arg) {
super.visit(n, arg);
n.setData(arg);
}
开发者ID:rfw,项目名称:genja,代码行数:6,代码来源:ScopeCollector.java
示例15: getTypeParameters
import japa.parser.ast.TypeParameter; //导入依赖的package包/类
public List<TypeParameter> getTypeParameters() {
return typeParameters;
}
开发者ID:rfw,项目名称:genja,代码行数:4,代码来源:ClassOrInterfaceDeclaration.java
示例16: setTypeParameters
import japa.parser.ast.TypeParameter; //导入依赖的package包/类
public void setTypeParameters(List<TypeParameter> typeParameters) {
this.typeParameters = typeParameters;
}
开发者ID:rfw,项目名称:genja,代码行数:4,代码来源:ClassOrInterfaceDeclaration.java
注:本文中的japa.parser.ast.TypeParameter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论