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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JavaSourceTypeprotected IJavaClassType[]protected IJavaClassTypeprotected com.sun.source.tree.MethodTreeprotected JavaSourceModifierListprotected JavaSourceParameter[]protected IJavaClassInfo[]protected IJavaClassInfoprotected IJavaClassTypeVariable[] -
Constructor Summary
ConstructorsConstructorDescriptionJavaSourceMethod(com.sun.source.tree.MethodTree method, JavaSourceType containingClass) -
Method Summary
Modifier and TypeMethodDescriptionintstatic JavaSourceMethodcreate(com.sun.source.tree.MethodTree method, JavaSourceType containingClass) booleanprotected IParameterInfo[]getActualParameterInfos(IFeatureInfo container, TypeVarToTypeMap actualParamByVarName, boolean bKeepTypeVars) getAnnotation(Class annotationClass) Returns this element's annotation for the specified type if such an annotation is present, else null.Returns all annotations that are directly present on this element.intgetName()com.sun.source.tree.TreegetTree()inthashCode()protected IJavaClassType[]protected IJavaClassInfo[]booleanisAnnotationPresent(Class<? extends Annotation> annotationClass) Returns true if an annotation for the specified type is present on this element, else false.booleanisBridge()booleanbooleanresolveImport(String relativeName) resolveType(String relativeName, int ignoreFlags) resolveType(String relativeName, IJavaClassInfo whosAskin, int ignoreFlags) toString()Methods inherited from class gw.lang.reflect.java.JavaSourceElement
findInnerSourceType, getCompilationUnitTree, getDeclaringClass, getEndPosition, getLocationInfo, getSourcePositions, getStartPositionMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface gw.lang.reflect.java.IJavaAnnotatedElement
getLocationInfo
-
Field Details
-
_method
protected com.sun.source.tree.MethodTree _method -
_containingClass
-
_parameters
-
_genericReturnType
-
_modifierList
-
_typeParameters
-
_genericParameterTypes
-
_parameterTypes
-
_returnType
-
-
Constructor Details
-
JavaSourceMethod
-
-
Method Details
-
getReturnClassInfo
- Specified by:
getReturnClassInfoin interfaceIJavaClassMethod
-
getGenericReturnType
- Specified by:
getGenericReturnTypein interfaceIJavaClassMethod
-
getReturnTypeName
- Specified by:
getReturnTypeNamein interfaceIJavaClassMethod
-
getReturnType
- Specified by:
getReturnTypein interfaceIJavaClassMethod
-
getGenericParameterTypes
- Specified by:
getGenericParameterTypesin interfaceIJavaClassMethod
-
getParameterTypes
- Specified by:
getParameterTypesin interfaceIJavaClassMethod
-
getName
- Specified by:
getNamein interfaceIJavaClassMethod
-
getParameterInfos
- Specified by:
getParameterInfosin interfaceIJavaClassMethod
-
getParameters
-
isConstructor
public boolean isConstructor() -
getTree
public com.sun.source.tree.Tree getTree()- Specified by:
getTreein classJavaSourceElement
-
getEnclosingClass
- Specified by:
getEnclosingClassin interfaceIJavaAnnotatedElement- Specified by:
getEnclosingClassin classJavaSourceElement
-
getModifiers
public int getModifiers()- Specified by:
getModifiersin interfaceIJavaClassMethod
-
getModifierList
-
getExceptionTypes
- Specified by:
getExceptionTypesin interfaceIJavaClassMethod
-
resolveType
- Specified by:
resolveTypein interfaceITypeInfoResolver
-
resolveType
- Specified by:
resolveTypein interfaceITypeInfoResolver
-
resolveImport
- Specified by:
resolveImportin interfaceITypeInfoResolver
-
getModule
- Specified by:
getModulein interfaceITypeInfoResolver
-
toString
-
isAnnotationPresent
Description copied from interface:IJavaAnnotatedElementReturns true if an annotation for the specified type is present on this element, else false. This method is designed primarily for convenient access to marker annotations.- Specified by:
isAnnotationPresentin interfaceIJavaAnnotatedElement- Parameters:
annotationClass- the Class object corresponding to the annotation type- Returns:
- true if an annotation for the specified annotation type is present on this element, else false
-
getAnnotation
Description copied from interface:IJavaAnnotatedElementReturns this element's annotation for the specified type if such an annotation is present, else null.- Specified by:
getAnnotationin interfaceIJavaAnnotatedElement- Parameters:
annotationClass- the Class object corresponding to the annotation type- Returns:
- this element's annotation for the specified annotation type if present on this element, else null
-
getDeclaredAnnotations
Description copied from interface:IJavaAnnotatedElementReturns all annotations that are directly present on this element. Unlike the other methods in this interface, this method ignores inherited annotations. (Returns an array of length zero if no annotations are directly present on this element.) The caller of this method is free to modify the returned array; it will have no effect on the arrays returned to other callers.- Specified by:
getDeclaredAnnotationsin interfaceIJavaAnnotatedElement- Returns:
- All annotations directly present on this element
-
initParameterTypes
-
initGenericParameterTypes
-
getDefaultValue
- Specified by:
getDefaultValuein interfaceIJavaClassMethod
-
invoke
public Object invoke(Object ctx, Object[] args) throws InvocationTargetException, IllegalAccessException - Specified by:
invokein interfaceIJavaClassMethod- Throws:
InvocationTargetExceptionIllegalAccessException
-
getTypeParameters
-
getTypeVariables
- 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(com.sun.source.tree.MethodTree method, JavaSourceType containingClass) -
getActualParameterInfos
protected IParameterInfo[] getActualParameterInfos(IFeatureInfo container, TypeVarToTypeMap actualParamByVarName, boolean bKeepTypeVars) -
hashCode
public int hashCode() -
equals
-
compareTo
- Specified by:
compareToin interfaceComparable<IJavaClassMethod>
-