本文整理汇总了Java中japa.parser.ast.TypeParameter类的典型用法代码示例。如果您正苦于以下问题:Java TypeParameter类的具体用法?Java TypeParameter怎么用?Java TypeParameter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TypeParameter类属于japa.parser.ast包,在下文中一共展示了TypeParameter类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例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--;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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(">");
}
}
示例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(" & ");
}
}
}
}
示例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;
}
示例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--;
}
示例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");
}
示例13: visit
import japa.parser.ast.TypeParameter; //导入依赖的package包/类
@Override
public Boolean visit(TypeParameter n, Void arg) {
return false;
}
示例14: visit
import japa.parser.ast.TypeParameter; //导入依赖的package包/类
@Override
public void visit(TypeParameter n, Scope arg) {
super.visit(n, arg);
n.setData(arg);
}
示例15: getTypeParameters
import japa.parser.ast.TypeParameter; //导入依赖的package包/类
public List<TypeParameter> getTypeParameters() {
return typeParameters;
}