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 JavaSourceParameter[] getParameters() { if (_parameters == null) { IJavaASTNode parametersNode = _methodNode.getChildOfTypes(JavaASTConstants.formalParameters); if (parametersNode == null) { _parameters = new JavaSourceParameter[0]; } else { List<IJavaASTNode> parameterNodes = parametersNode.getChildrenOfTypes( JavaASTConstants.normalParameterDecl, JavaASTConstants.ellipsisParameterDecl); _parameters = new JavaSourceParameter[parameterNodes.size()]; for (int i = 0; i < _parameters.length; i++) { _parameters[i] = new JavaSourceParameter(this, parameterNodes.get(i)); } } } return _parameters; }