org.jboss.errai.codegen.meta.impl.java
Class JavaReflectionMethod
java.lang.Object
org.jboss.errai.codegen.meta.MetaMethod
org.jboss.errai.codegen.meta.impl.java.JavaReflectionMethod
- All Implemented Interfaces:
- HasAnnotations, MetaClassMember, MetaGenericDeclaration
public class JavaReflectionMethod
- extends MetaMethod
JavaReflectionMethod
public JavaReflectionMethod(Method method)
JavaReflectionMethod
public JavaReflectionMethod(MetaClass referenceClass,
Method method)
getName
public String getName()
- Specified by:
getName
in interface MetaClassMember
- Specified by:
getName
in class MetaMethod
getParameters
public MetaParameter[] getParameters()
- Specified by:
getParameters
in class MetaMethod
getReturnType
public MetaClass getReturnType()
- Description copied from class:
MetaMethod
- Returns the MetaClass representing this method's return type. The returned
MetaClass may have had its generic information erased.
- Specified by:
getReturnType
in class MetaMethod
- Returns:
getGenericReturnType
public MetaType getGenericReturnType()
- Description copied from class:
MetaMethod
- Returns the MetaType representing the return type of the method. In the
case of a plain, non-parameterized return type, this will return a
MetaClass
equivalent to the one returned by
MetaMethod.getReturnType()
. Other possible types could be
MetaWildcardType
, MetaParameterizedType
, and
MetaTypeVariable
.
As of Errai 2.2, some implementations of this method are incomplete and
will return null if they cannot make sense of the method's return type.
- Specified by:
getGenericReturnType
in class MetaMethod
- Returns:
getGenericParameterTypes
public MetaType[] getGenericParameterTypes()
- Specified by:
getGenericParameterTypes
in class MetaMethod
getTypeParameters
public MetaTypeVariable[] getTypeParameters()
- Description copied from interface:
MetaGenericDeclaration
- Returns the array of type variables declared on this generic declaration
site, in the order they were declared in the source code.
- Returns:
- the type variables declared at this site. The returned array is
never null, but it will be empty if no type variable are declared
at this site.
getAnnotations
public Annotation[] getAnnotations()
getCheckedExceptions
public MetaClass[] getCheckedExceptions()
- Specified by:
getCheckedExceptions
in class MetaMethod
getDeclaringClass
public MetaClass getDeclaringClass()
isAbstract
public boolean isAbstract()
isPublic
public boolean isPublic()
isPrivate
public boolean isPrivate()
isProtected
public boolean isProtected()
isFinal
public boolean isFinal()
isStatic
public boolean isStatic()
isTransient
public boolean isTransient()
isVolatile
public boolean isVolatile()
isSynthetic
public boolean isSynthetic()
isSynchronized
public boolean isSynchronized()
isVarArgs
public boolean isVarArgs()
- Specified by:
isVarArgs
in class MetaMethod
asMethod
public Method asMethod()
- Overrides:
asMethod
in class MetaMethod
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.