Method - JRE Emulation | JRE Emulation
public class

Method

extends Executable
java.lang.Object
   ↳ java.lang.reflect.AccessibleObject
     ↳ java.lang.reflect.Executable
       ↳ java.lang.reflect.Method

Class Overview

Stub implementation of Method. The actual implementation is in Method.h and Method.m, so the declared methods in this class should match the actual methods implemented in order to catch unsupported API references.

See Also

Summary

[Expand]
Inherited Constants
From interface java.lang.reflect.Member
Public Constructors
Method()
Public Methods
<T extends Annotation> T getAnnotation(Class<T> annotationClass)
Returns this element's annotation for the specified type if such an annotation is present, else null.
Annotation[] getDeclaredAnnotations()
Returns annotations that are directly present on this element.
Class<?> getDeclaringClass()
Returns the class that declares this member.
Object getDefaultValue()
Class[] getExceptionTypes()
Type[] getGenericExceptionTypes()
Type[] getGenericParameterTypes()
Type getGenericReturnType()
int getModifiers()
Returns the modifiers for this member.
String getName()
Returns the name of this member.
Annotation[][] getParameterAnnotations()
Class[]<?> getParameterTypes()
Class getReturnType()
TypeVariable[]<Method> getTypeParameters()
Returns the declared type parameters in declaration order.
Object invoke(Object o, Object... args)
boolean isDefault()
boolean isSynthetic()
Indicates whether or not this member is synthetic (artificially introduced by the compiler).
boolean isVarArgs()
String toGenericString()
Inherited Methods
[Expand]
From class java.lang.reflect.Executable
From class java.lang.reflect.AccessibleObject
From class java.lang.Object
From interface java.lang.reflect.GenericDeclaration
From interface java.lang.reflect.Member
From interface java.lang.reflect.AnnotatedElement

Public Constructors

public Method ()

Public Methods

public T getAnnotation (Class<T> annotationClass)

Returns this element's annotation for the specified type if such an annotation is present, else null.

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

public Annotation[] getDeclaredAnnotations ()

Returns annotations that are directly present on this element. This method ignores inherited annotations. If there are no annotations directly present on this element, the return value is an array of length 0. The caller of this method is free to modify the returned array; it will have no effect on the arrays returned to other callers.

Returns
  • annotations directly present on this element

public Class<?> getDeclaringClass ()

Returns the class that declares this member.

Returns
  • the declaring class

public Object getDefaultValue ()

public Class[] getExceptionTypes ()

public Type[] getGenericExceptionTypes ()

public Type[] getGenericParameterTypes ()

public Type getGenericReturnType ()

public int getModifiers ()

Returns the modifiers for this member. The Modifier class should be used to decode the result.

Returns
  • the modifiers for this member

public String getName ()

Returns the name of this member.

Returns
  • the name of this member

public Annotation[][] getParameterAnnotations ()

public Class[]<?> getParameterTypes ()

public Class getReturnType ()

public TypeVariable[]<Method> getTypeParameters ()

Returns the declared type parameters in declaration order. If there are no type parameters, this method returns a zero length array.

Returns
  • the declared type parameters in declaration order

public boolean isDefault ()

public boolean isSynthetic ()

Indicates whether or not this member is synthetic (artificially introduced by the compiler).

Returns
  • true if this member is synthetic, false otherwise

public boolean isVarArgs ()

public String toGenericString ()