Class JavaSourceMethod
- java.lang.Object
-
- gw.lang.reflect.java.JavaSourceElement
-
- gw.internal.gosu.parser.java.classinfo.JavaSourceMethod
-
- All Implemented Interfaces:
IJavaAnnotatedElement,IJavaClassMethod,ITypeInfoResolver,Serializable,Comparable<IJavaClassMethod>
- Direct Known Subclasses:
JavaSourceAnnotationMethod,JavaSourceConstructor
public class JavaSourceMethod extends JavaSourceElement implements IJavaClassMethod, ITypeInfoResolver
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected JavaSourceType_containingClassprotected IJavaClassType[]_genericParameterTypesprotected IJavaClassType_genericReturnTypeprotected MethodTree_methodprotected JavaSourceModifierList_modifierListprotected JavaSourceParameter[]_parametersprotected IJavaClassInfo[]_parameterTypesprotected IJavaClassInfo_returnTypeprotected IJavaClassTypeVariable[]_typeParameters
-
Constructor Summary
Constructors Constructor Description JavaSourceMethod(MethodTree method, JavaSourceType containingClass)
-
Method Summary
-
Methods inherited from class gw.lang.reflect.java.JavaSourceElement
findInnerSourceType, getCompilationUnitTree, getDeclaringClass, getEndPosition, getLocationInfo, getSourcePositions, getStartPosition
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface gw.lang.reflect.java.IJavaAnnotatedElement
getLocationInfo
-
-
-
-
Field Detail
-
_method
protected MethodTree _method
-
_containingClass
protected JavaSourceType _containingClass
-
_parameters
protected JavaSourceParameter[] _parameters
-
_genericReturnType
protected IJavaClassType _genericReturnType
-
_modifierList
protected JavaSourceModifierList _modifierList
-
_typeParameters
protected IJavaClassTypeVariable[] _typeParameters
-
_genericParameterTypes
protected IJavaClassType[] _genericParameterTypes
-
_parameterTypes
protected IJavaClassInfo[] _parameterTypes
-
_returnType
protected IJavaClassInfo _returnType
-
-
Constructor Detail
-
JavaSourceMethod
public JavaSourceMethod(MethodTree method, JavaSourceType containingClass)
-
-
Method Detail
-
getReturnClassInfo
public IJavaClassInfo getReturnClassInfo()
- Specified by:
getReturnClassInfoin interfaceIJavaClassMethod
-
getGenericReturnType
public IJavaClassType getGenericReturnType()
- Specified by:
getGenericReturnTypein interfaceIJavaClassMethod
-
getReturnTypeName
public String getReturnTypeName()
- Specified by:
getReturnTypeNamein interfaceIJavaClassMethod
-
getReturnType
public IType getReturnType()
- Specified by:
getReturnTypein interfaceIJavaClassMethod
-
getGenericParameterTypes
public IJavaClassType[] getGenericParameterTypes()
- Specified by:
getGenericParameterTypesin interfaceIJavaClassMethod
-
getParameterTypes
public IJavaClassInfo[] getParameterTypes()
- Specified by:
getParameterTypesin interfaceIJavaClassMethod
-
getName
public String getName()
- Specified by:
getNamein interfaceIJavaClassMethod
-
getParameterInfos
public List<Parameter> getParameterInfos()
- Specified by:
getParameterInfosin interfaceIJavaClassMethod
-
getParameters
public JavaSourceParameter[] getParameters()
-
isConstructor
public boolean isConstructor()
-
getTree
public Tree getTree()
- Specified by:
getTreein classJavaSourceElement
-
getEnclosingClass
public JavaSourceType getEnclosingClass()
- Specified by:
getEnclosingClassin interfaceIJavaAnnotatedElement- Specified by:
getEnclosingClassin classJavaSourceElement
-
getModifiers
public int getModifiers()
- Specified by:
getModifiersin interfaceIJavaClassMethod
-
getModifierList
public IModifierList getModifierList()
-
getExceptionTypes
public IJavaClassInfo[] getExceptionTypes()
- Specified by:
getExceptionTypesin interfaceIJavaClassMethod
-
resolveType
public IJavaClassType resolveType(String relativeName, int ignoreFlags)
- Specified by:
resolveTypein interfaceITypeInfoResolver
-
resolveType
public IJavaClassType resolveType(String relativeName, IJavaClassInfo whosAskin, int ignoreFlags)
- Specified by:
resolveTypein interfaceITypeInfoResolver
-
resolveImport
public IJavaClassType resolveImport(String relativeName)
- Specified by:
resolveImportin interfaceITypeInfoResolver
-
getModule
public IModule getModule()
- Specified by:
getModulein interfaceITypeInfoResolver
-
isAnnotationPresent
public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass)
- Specified by:
isAnnotationPresentin interfaceIJavaAnnotatedElement
-
getAnnotation
public IAnnotationInfo getAnnotation(Class annotationClass)
- Specified by:
getAnnotationin interfaceIJavaAnnotatedElement
-
getDeclaredAnnotations
public IAnnotationInfo[] getDeclaredAnnotations()
- Specified by:
getDeclaredAnnotationsin interfaceIJavaAnnotatedElement
-
initParameterTypes
protected IJavaClassInfo[] initParameterTypes()
-
initGenericParameterTypes
protected IJavaClassType[] initGenericParameterTypes()
-
getDefaultValue
public Object getDefaultValue()
- Specified by:
getDefaultValuein interfaceIJavaClassMethod
-
invoke
public Object invoke(Object ctx, Object[] args) throws InvocationTargetException, IllegalAccessException
- Specified by:
invokein interfaceIJavaClassMethod- Throws:
InvocationTargetExceptionIllegalAccessException
-
getTypeParameters
public IJavaClassTypeVariable[] getTypeParameters()
-
getTypeVariables
public IGenericTypeVariable[] getTypeVariables(IJavaMethodInfo mi)
- Specified by:
getTypeVariablesin interfaceIJavaClassMethod
-
isBridge
public boolean isBridge()
- Specified by:
isBridgein interfaceIJavaClassMethod
-
isSynthetic
public boolean isSynthetic()
- Specified by:
isSyntheticin interfaceIJavaClassMethod
-
create
public static JavaSourceMethod create(MethodTree method, JavaSourceType containingClass)
-
getActualParameterInfos
protected IParameterInfo[] getActualParameterInfos(IFeatureInfo container, TypeVarToTypeMap actualParamByVarName, boolean bKeepTypeVars)
-
compareTo
public int compareTo(IJavaClassMethod o)
- Specified by:
compareToin interfaceComparable<IJavaClassMethod>
-
-