Class SyntheticJavaMethod
- java.lang.Object
-
- gw.internal.gosu.parser.java.classinfo.SyntheticJavaMethod
-
- All Implemented Interfaces:
IJavaAnnotatedElement
,IJavaClassMethod
,Serializable
,Comparable<IJavaClassMethod>
public class SyntheticJavaMethod extends Object implements IJavaClassMethod
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SyntheticJavaMethod(IJavaClassInfo enclosingclass, IJavaClassInfo returnclassinfo, IJavaClassType returntype, String name, int modifiers, IJavaClassInfo[] params, IJavaClassInfo[] exceptions)
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface gw.lang.reflect.java.IJavaAnnotatedElement
getLocationInfo
-
-
-
-
Constructor Detail
-
SyntheticJavaMethod
public SyntheticJavaMethod(IJavaClassInfo enclosingclass, IJavaClassInfo returnclassinfo, IJavaClassType returntype, String name, int modifiers, IJavaClassInfo[] params, IJavaClassInfo[] exceptions)
-
-
Method Detail
-
getReturnClassInfo
public IJavaClassInfo getReturnClassInfo()
- Specified by:
getReturnClassInfo
in interfaceIJavaClassMethod
-
getGenericReturnType
public IJavaClassType getGenericReturnType()
- Specified by:
getGenericReturnType
in interfaceIJavaClassMethod
-
getReturnTypeName
public String getReturnTypeName()
- Specified by:
getReturnTypeName
in interfaceIJavaClassMethod
-
getReturnType
public IType getReturnType()
- Specified by:
getReturnType
in interfaceIJavaClassMethod
-
getGenericParameterTypes
public IJavaClassType[] getGenericParameterTypes()
- Specified by:
getGenericParameterTypes
in interfaceIJavaClassMethod
-
getParameterTypes
public IJavaClassInfo[] getParameterTypes()
- Specified by:
getParameterTypes
in interfaceIJavaClassMethod
-
getName
public String getName()
- Specified by:
getName
in interfaceIJavaClassMethod
-
getParameterInfos
public List<Parameter> getParameterInfos()
- Specified by:
getParameterInfos
in interfaceIJavaClassMethod
-
getModifiers
public int getModifiers()
- Specified by:
getModifiers
in interfaceIJavaClassMethod
-
getExceptionTypes
public IJavaClassInfo[] getExceptionTypes()
- Specified by:
getExceptionTypes
in interfaceIJavaClassMethod
-
getDefaultValue
public Object getDefaultValue()
- Specified by:
getDefaultValue
in interfaceIJavaClassMethod
-
invoke
public Object invoke(Object ctx, Object[] args) throws InvocationTargetException, IllegalAccessException
- Specified by:
invoke
in interfaceIJavaClassMethod
- Throws:
InvocationTargetException
IllegalAccessException
-
getTypeVariables
public IGenericTypeVariable[] getTypeVariables(IJavaMethodInfo javaMethodInfo)
- Specified by:
getTypeVariables
in interfaceIJavaClassMethod
-
isSynthetic
public boolean isSynthetic()
- Specified by:
isSynthetic
in interfaceIJavaClassMethod
-
isBridge
public boolean isBridge()
- Specified by:
isBridge
in interfaceIJavaClassMethod
-
compareTo
public int compareTo(IJavaClassMethod o)
- Specified by:
compareTo
in interfaceComparable<IJavaClassMethod>
-
isAnnotationPresent
public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass)
Description copied from interface:IJavaAnnotatedElement
Returns 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:
isAnnotationPresent
in 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(Class<? extends Annotation> annotationClass)
Description copied from interface:IJavaAnnotatedElement
Returns this element's annotation for the specified type if such an annotation is present, else null.- Specified by:
getAnnotation
in 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:IJavaAnnotatedElement
Returns 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:
getDeclaredAnnotations
in interfaceIJavaAnnotatedElement
- Returns:
- All annotations directly present on this element
-
getEnclosingClass
public IJavaClassInfo getEnclosingClass()
- Specified by:
getEnclosingClass
in interfaceIJavaAnnotatedElement
-
-