public abstract class MethodInfo
extends java.lang.Object
implements java.lang.reflect.GenericDeclaration, java.lang.reflect.Member
| Constructor and Description |
|---|
MethodInfo() |
| Modifier and Type | Method and Description |
|---|---|
static MethodInfo |
fromConstructor(java.lang.reflect.Constructor<?> constructor)
Wraps a constructor as a method information object.
|
static java.util.List<MethodInfo> |
fromConstructors(java.util.Collection<java.lang.reflect.Constructor<?>> constructors)
Construct a list of method infos from a given collection of constructors.
|
static java.util.Collection<MethodInfo> |
fromConstructors(java.lang.reflect.Constructor<?>[] constructors)
Construct a list of method infos from a given array of constructors.
|
static MethodInfo |
fromMethod(java.lang.reflect.Method method)
Wraps a method as a MethodInfo object.
|
static java.util.List<MethodInfo> |
fromMethods(java.util.Collection<java.lang.reflect.Method> methods)
Construct a list of method infos from a given collection of methods.
|
static java.util.Collection<MethodInfo> |
fromMethods(java.lang.reflect.Method[] methods)
Construct a list of method infos from a given array of methods.
|
abstract java.lang.Class<?>[] |
getExceptionTypes()
Returns an array of Class objects that represent the types of the exceptions declared to be thrown by the
underlying method or constructor represented by this MethodInfo object.
|
abstract java.lang.Class<?>[] |
getParameterTypes()
Returns an array of Class objects that represent the formal parameter types, in declaration order,
of the method or constructor represented by this MethodInfo object.
|
abstract java.lang.Class<?> |
getReturnType()
Returns a Class object that represents the formal return type of the method or constructor
represented by this MethodInfo object.
|
abstract boolean |
isConstructor()
Determine if this is a constructor or not.
|
abstract java.lang.String |
toGenericString()
Returns a string describing this method or constructor, including type parameters.
|
java.lang.String |
toString()
Returns a string describing this method or constructor
|
public static MethodInfo fromMethod(java.lang.reflect.Method method)
method - - the method to wrap.public static java.util.Collection<MethodInfo> fromMethods(java.lang.reflect.Method[] methods)
methods - - array of methods.public static java.util.List<MethodInfo> fromMethods(java.util.Collection<java.lang.reflect.Method> methods)
methods - - list of methods.public static MethodInfo fromConstructor(java.lang.reflect.Constructor<?> constructor)
constructor - - the constructor to wrap.public static java.util.Collection<MethodInfo> fromConstructors(java.lang.reflect.Constructor<?>[] constructors)
constructors - - array of constructors.public static java.util.List<MethodInfo> fromConstructors(java.util.Collection<java.lang.reflect.Constructor<?>> constructors)
constructors - - list of constructors.public java.lang.String toString()
toString in class java.lang.ObjectMethod.toString(),
Constructor.toString()public abstract java.lang.String toGenericString()
Method.toGenericString(),
Constructor.toGenericString()public abstract java.lang.Class<?>[] getExceptionTypes()
Method.getExceptionTypes(),
Constructor.getExceptionTypes()public abstract java.lang.Class<?> getReturnType()
This is always Void for constructors.
Method.getReturnType()public abstract java.lang.Class<?>[] getParameterTypes()
Method.getParameterTypes(),
Constructor.getParameterTypes()public abstract boolean isConstructor()