1 19 package org.netbeans.modules.javacore.parser; 20 21 import org.netbeans.lib.java.parser.ASTree; 22 import org.netbeans.lib.java.parser.ASTreeTypes; 23 import org.netbeans.modules.javacore.jmiimpl.javamodel.SemiPersistentElement; 24 25 29 public final class ParameterInfo extends ElementInfo { 30 public static final int PARAMETER_TYPE = ASTreeTypes.FORMAL_PARAMETER; 31 32 public final boolean isFinal; 33 public final TypeRef type; public final boolean isVarArg; 35 public final AnnotationInfo[] annotations; 36 37 public ParameterInfo(ASTree tree, int infoType, String name, boolean isFinal, TypeRef type, boolean isVarArg, AnnotationInfo[] annotations) { 38 super(tree, infoType, name); 39 this.isFinal = isFinal; 40 this.type = type; 41 this.isVarArg = isVarArg; 42 this.annotations = annotations == null ? EMPTY_ANNOTATIONS: annotations; 43 } 44 45 public ASTree getTypeAST(SemiPersistentElement owner) { 46 ASTree tree = owner.getASTree(); 47 if (tree != null) { 48 return tree.getSubTrees()[1]; 49 } 50 return null; 51 } 52 } 53 | Popular Tags |