APIdia Launch Partner
Top Description Fields Constructors Methods
com.badlogic.gdx.utils.reflect

public final Class Method

extends Object
Class Inheritance
Imports
java.lang.reflect.InvocationTargetException, .Modifier

Provides information about, and access to, a single method on a class or interface.
Author
nexsoftware

Field Summary

Modifier and TypeField and Description
private final Method

Constructor Summary

AccessConstructor and Description
pack-priv
Method(Method method)

Method Summary

Modifier and TypeMethod and Description
public Annotation
getDeclaredAnnotation(Class<? extends Annotation> annotationType)

Returns an Annotation object reflecting the annotation provided, or null of this method doesn't have such an annotation.

public Annotation[]
getDeclaredAnnotations()

Returns an array of Annotation objects reflecting all annotations declared by this method, or an empty array if there are none.

public Class<T>
getDeclaringClass()

Returns the Class object representing the class or interface that declares the method.

public String
getName()

Returns the name of the method.

public Class<T>[]
getParameterTypes()

Returns an array of Class objects that represent the formal parameter types, in declaration order, of the method.

public Class<T>
getReturnType()

Returns a Class object that represents the formal return type of the method.

public Object
invoke(Object obj, Object... args)

Invokes the underlying method on the supplied object with the supplied parameters.

public boolean
isAbstract()

Return true if the method includes the abstract modifier.

public boolean
public boolean
isAnnotationPresent(Class<? extends Annotation> annotationType)

Returns true if the method includes an annotation of the provided class type.

public boolean
isDefaultAccess()

Return true if the method does not include any of the private, protected, or public modifiers.

public boolean
isFinal()

Return true if the method includes the final modifier.

public boolean
isNative()

Return true if the method includes the native modifier.

public boolean
isPrivate()

Return true if the method includes the private modifier.

public boolean
isProtected()

Return true if the method includes the protected modifier.

public boolean
isPublic()

Return true if the method includes the public modifier.

public boolean
isStatic()

Return true if the method includes the static modifier.

public boolean
isVarArgs()

Return true if the method takes a variable number of arguments.

public void
setAccessible(boolean accessible)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

methodback to summary
private final Method method

Constructor Detail

Methodback to summary
pack-priv Method(Method method)

Method Detail

getDeclaredAnnotationback to summary
public Annotation getDeclaredAnnotation(Class<? extends Annotation> annotationType)

Returns an Annotation object reflecting the annotation provided, or null of this method doesn't have such an annotation. This is a convenience function if the caller knows already which annotation type he's looking for.

getDeclaredAnnotationsback to summary
public Annotation[] getDeclaredAnnotations()

Returns an array of Annotation objects reflecting all annotations declared by this method, or an empty array if there are none. Does not include inherited annotations. Does not include parameter annotations.

getDeclaringClassback to summary
public Class<T> getDeclaringClass()

Returns the Class object representing the class or interface that declares the method.

getNameback to summary
public String getName()

Returns the name of the method.

getParameterTypesback to summary
public Class<T>[] getParameterTypes()

Returns an array of Class objects that represent the formal parameter types, in declaration order, of the method.

getReturnTypeback to summary
public Class<T> getReturnType()

Returns a Class object that represents the formal return type of the method.

invokeback to summary
public Object invoke(Object obj, Object... args) throws ReflectionException

Invokes the underlying method on the supplied object with the supplied parameters.

isAbstractback to summary
public boolean isAbstract()

Return true if the method includes the abstract modifier.

isAccessibleback to summary
public boolean isAccessible()
isAnnotationPresentback to summary
public boolean isAnnotationPresent(Class<? extends Annotation> annotationType)

Returns true if the method includes an annotation of the provided class type.

isDefaultAccessback to summary
public boolean isDefaultAccess()

Return true if the method does not include any of the private, protected, or public modifiers.

isFinalback to summary
public boolean isFinal()

Return true if the method includes the final modifier.

isNativeback to summary
public boolean isNative()

Return true if the method includes the native modifier.

isPrivateback to summary
public boolean isPrivate()

Return true if the method includes the private modifier.

isProtectedback to summary
public boolean isProtected()

Return true if the method includes the protected modifier.

isPublicback to summary
public boolean isPublic()

Return true if the method includes the public modifier.

isStaticback to summary
public boolean isStatic()

Return true if the method includes the static modifier.

isVarArgsback to summary
public boolean isVarArgs()

Return true if the method takes a variable number of arguments.

setAccessibleback to summary
public void setAccessible(boolean accessible)