Package gw.internal.gosu.parser
Class AsmMethodJavaClassMethod
- java.lang.Object
-
- gw.lang.reflect.java.JavaSourceElement
-
- gw.internal.gosu.parser.AsmMethodJavaClassMethod
-
- All Implemented Interfaces:
IJavaAnnotatedElement,IJavaClassBytecodeMethod,IJavaClassMethod,java.io.Serializable,java.lang.Comparable<IJavaClassMethod>
public class AsmMethodJavaClassMethod extends JavaSourceElement implements IJavaClassMethod, IJavaClassBytecodeMethod
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AsmMethodJavaClassMethod(AsmMethod method, IModule module)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(IJavaClassMethod o)booleanequals(java.lang.Object o)private JavaSourceElementfindSourceMethod(ISourceFileHandle sfh)IAnnotationInfogetAnnotation(java.lang.Class annotationClass)Returns this element's annotation for the specified type if such an annotation is present, else null.IAnnotationInfo[]getDeclaredAnnotations()Returns all annotations that are directly present on this element.java.lang.ObjectgetDefaultValue()IJavaClassInfogetEnclosingClass()IJavaClassInfo[]getExceptionTypes()IJavaClassType[]getGenericParameterTypes()IJavaClassTypegetGenericReturnType()intgetModifiers()java.lang.StringgetName()java.util.List<Parameter>getParameterInfos()IJavaClassInfo[]getParameterTypes()IJavaClassInfogetReturnClassInfo()ITypegetReturnType()java.lang.StringgetReturnTypeName()com.sun.source.tree.TreegetTree()IGenericTypeVariable[]getTypeVariables(IJavaMethodInfo mi)inthashCode()java.lang.Objectinvoke(java.lang.Object ctx, java.lang.Object[] args)booleanisAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)Returns true if an annotation for the specified type is present on this element, else false.booleanisBridge()booleanisSynthetic()private java.lang.ObjectmakeArray(java.util.List l)private java.lang.ObjectnormalizeValue(java.lang.Object value)voidsetAccessible(boolean accessible)java.lang.StringtoString()-
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
-
-
-
-
Method Detail
-
getReturnType
public IType getReturnType()
- Specified by:
getReturnTypein interfaceIJavaClassMethod
-
getReturnClassInfo
public IJavaClassInfo getReturnClassInfo()
- Specified by:
getReturnClassInfoin interfaceIJavaClassMethod
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfaceIJavaClassMethod
-
getParameterInfos
public java.util.List<Parameter> getParameterInfos()
- Specified by:
getParameterInfosin interfaceIJavaClassMethod
-
getEnclosingClass
public IJavaClassInfo getEnclosingClass()
- Specified by:
getEnclosingClassin interfaceIJavaAnnotatedElement- Specified by:
getEnclosingClassin classJavaSourceElement
-
getParameterTypes
public IJavaClassInfo[] getParameterTypes()
- Specified by:
getParameterTypesin interfaceIJavaClassMethod
-
getModifiers
public int getModifiers()
- Specified by:
getModifiersin interfaceIJavaClassMethod
-
isSynthetic
public boolean isSynthetic()
- Specified by:
isSyntheticin interfaceIJavaClassBytecodeMethod- Specified by:
isSyntheticin interfaceIJavaClassMethod
-
isBridge
public boolean isBridge()
- Specified by:
isBridgein interfaceIJavaClassBytecodeMethod- Specified by:
isBridgein interfaceIJavaClassMethod
-
getExceptionTypes
public IJavaClassInfo[] getExceptionTypes()
- Specified by:
getExceptionTypesin interfaceIJavaClassMethod
-
getDefaultValue
public java.lang.Object getDefaultValue()
- Specified by:
getDefaultValuein interfaceIJavaClassMethod
-
normalizeValue
private java.lang.Object normalizeValue(java.lang.Object value)
-
makeArray
private java.lang.Object makeArray(java.util.List l)
-
getReturnTypeName
public java.lang.String getReturnTypeName()
- Specified by:
getReturnTypeNamein interfaceIJavaClassMethod
-
isAnnotationPresent
public boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
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
public IAnnotationInfo getAnnotation(java.lang.Class annotationClass)
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
public IAnnotationInfo[] 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
-
setAccessible
public void setAccessible(boolean accessible)
-
invoke
public java.lang.Object invoke(java.lang.Object ctx, java.lang.Object[] args) throws java.lang.reflect.InvocationTargetException, java.lang.IllegalAccessException- Specified by:
invokein interfaceIJavaClassMethod- Throws:
java.lang.reflect.InvocationTargetExceptionjava.lang.IllegalAccessException
-
getTypeVariables
public IGenericTypeVariable[] getTypeVariables(IJavaMethodInfo mi)
- Specified by:
getTypeVariablesin interfaceIJavaClassMethod
-
getGenericParameterTypes
public IJavaClassType[] getGenericParameterTypes()
- Specified by:
getGenericParameterTypesin interfaceIJavaClassMethod
-
getGenericReturnType
public IJavaClassType getGenericReturnType()
- Specified by:
getGenericReturnTypein interfaceIJavaClassMethod
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
compareTo
public int compareTo(IJavaClassMethod o)
- Specified by:
compareToin interfacejava.lang.Comparable<IJavaClassMethod>
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getTree
public com.sun.source.tree.Tree getTree()
- Specified by:
getTreein classJavaSourceElement
-
findSourceMethod
private JavaSourceElement findSourceMethod(ISourceFileHandle sfh)
-
-