com.badlogic.gdx.utils.reflect
Class Method

java.lang.Object
  extended by com.badlogic.gdx.utils.reflect.Method

public final class Method
extends Object

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

Author:
nexsoftware

Method Summary
 Class getDeclaringClass()
          Returns the Class object representing the class or interface that declares the method.
 String getName()
          Returns the name of the method.
 Class[] getParameterTypes()
          Returns an array of Class objects that represent the formal parameter types, in declaration order, of the method.
 Class getReturnType()
          Returns a Class object that represents the formal return type of the method.
 Object invoke(Object obj, Object... args)
          Invokes the underlying method on the supplied object with the supplied parameters.
 boolean isAbstract()
          Return true if the method includes the abstract modifier.
 boolean isAccessible()
           
 boolean isDefaultAccess()
          Return true if the method does not include any of the private, protected, or public modifiers.
 boolean isFinal()
          Return true if the method includes the final modifier.
 boolean isNative()
          Return true if the method includes the native modifier.
 boolean isPrivate()
          Return true if the method includes the private modifier.
 boolean isProtected()
          Return true if the method includes the protected modifier.
 boolean isPublic()
          Return true if the method includes the public modifier.
 boolean isStatic()
          Return true if the method includes the static modifier.
 boolean isVarArgs()
          Return true if the method takes a variable number of arguments.
 void setAccessible(boolean accessible)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getName

public String getName()
Returns the name of the method.


getReturnType

public Class getReturnType()
Returns a Class object that represents the formal return type of the method.


getParameterTypes

public Class[] getParameterTypes()
Returns an array of Class objects that represent the formal parameter types, in declaration order, of the method.


getDeclaringClass

public Class getDeclaringClass()
Returns the Class object representing the class or interface that declares the method.


isAccessible

public boolean isAccessible()

setAccessible

public void setAccessible(boolean accessible)

isAbstract

public boolean isAbstract()
Return true if the method includes the abstract modifier.


isDefaultAccess

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


isFinal

public boolean isFinal()
Return true if the method includes the final modifier.


isPrivate

public boolean isPrivate()
Return true if the method includes the private modifier.


isProtected

public boolean isProtected()
Return true if the method includes the protected modifier.


isPublic

public boolean isPublic()
Return true if the method includes the public modifier.


isNative

public boolean isNative()
Return true if the method includes the native modifier.


isStatic

public boolean isStatic()
Return true if the method includes the static modifier.


isVarArgs

public boolean isVarArgs()
Return true if the method takes a variable number of arguments.


invoke

public Object invoke(Object obj,
                     Object... args)
              throws ReflectionException
Invokes the underlying method on the supplied object with the supplied parameters.

Throws:
ReflectionException


Copyright © 2013. All Rights Reserved.