예제 #1
0
 public IJavaClassTypeVariable[] getTypeParameters() {
   if (_typeParameters == null) {
     IJavaASTNode typeParamsNode = _methodNode.getChildOfType(JavaASTConstants.typeParameters);
     if (typeParamsNode != null) {
       List<IJavaASTNode> typeParamNodes =
           typeParamsNode.getChildrenOfTypes(JavaASTConstants.typeParameter);
       _typeParameters = new IJavaClassTypeVariable[typeParamNodes.size()];
       for (int i = 0; i < _typeParameters.length; i++) {
         _typeParameters[i] = JavaSourceTypeVariable.create(this, typeParamNodes.get(i));
       }
     } else {
       _typeParameters = JavaSourceTypeVariable.EMPTY;
     }
   }
   return _typeParameters;
 }
 public JavaSourceTypeVariable copy() {
   JavaSourceTypeVariable copy = new JavaSourceTypeVariable(_owner, _typeParameter);
   copy._variance = _variance;
   return copy;
 }