Package gw.internal.gosu.parser
Class MethodJavaClassMethod
- java.lang.Object
-
- gw.internal.gosu.parser.MethodJavaClassMethod
-
- All Implemented Interfaces:
IJavaAnnotatedElement,IJavaClassBytecodeMethod,IJavaClassMethod,java.io.Serializable,java.lang.Comparable<IJavaClassMethod>
public class MethodJavaClassMethod extends java.lang.Object implements IJavaClassMethod, IJavaClassBytecodeMethod
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MethodJavaClassMethod(java.lang.reflect.Method method, IModule module)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(IJavaClassMethod o)booleanequals(java.lang.Object o)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()java.lang.reflect.MethodgetJavaMethod()java.lang.Class[]getJavaParameterTypes()intgetModifiers()java.lang.StringgetName()java.util.List<Parameter>getParameterInfos()IJavaClassInfo[]getParameterTypes()IJavaClassInfogetReturnClassInfo()ITypegetReturnType()java.lang.StringgetReturnTypeName()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()voidsetAccessible(boolean accessible)java.lang.StringtoString()-
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
private java.lang.reflect.Method _method
-
_module
private IModule _module
-
-
Constructor Detail
-
MethodJavaClassMethod
public MethodJavaClassMethod(java.lang.reflect.Method method, IModule module)
-
-
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
-
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
-
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
-
getJavaParameterTypes
public java.lang.Class[] getJavaParameterTypes()
-
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>
-
getJavaMethod
public java.lang.reflect.Method getJavaMethod()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-