public abstract class MethodInfo extends Object implements GenericDeclaration, Member
| Constructor and Description |
|---|
MethodInfo() |
| Modifier and Type | Method and Description |
|---|---|
static MethodInfo |
fromConstructor(Constructor<?> constructor)
Wraps a constructor as a method information object.
|
static List<MethodInfo> |
fromConstructors(Collection<Constructor<?>> constructors)
Construct a list of method infos from a given collection of constructors.
|
static Collection<MethodInfo> |
fromConstructors(Constructor<?>[] constructors)
Construct a list of method infos from a given array of constructors.
|
static MethodInfo |
fromMethod(Method method)
Wraps a method as a MethodInfo object.
|
static List<MethodInfo> |
fromMethods(Collection<Method> methods)
Construct a list of method infos from a given collection of methods.
|
static Collection<MethodInfo> |
fromMethods(Method[] methods)
Construct a list of method infos from a given array of methods.
|
abstract 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 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 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 String |
toGenericString()
Returns a string describing this method or constructor, including type parameters.
|
String |
toString()
Returns a string describing this method or constructor
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetTypeParametersgetAnnotation, getAnnotations, getAnnotationsByType, getDeclaredAnnotation, getDeclaredAnnotations, getDeclaredAnnotationsByType, isAnnotationPresentgetDeclaringClass, getModifiers, getName, isSyntheticpublic static MethodInfo fromMethod(Method method)
method - - the method to wrap.public static Collection<MethodInfo> fromMethods(Method[] methods)
methods - - array of methods.public static List<MethodInfo> fromMethods(Collection<Method> methods)
methods - - list of methods.public static MethodInfo fromConstructor(Constructor<?> constructor)
constructor - - the constructor to wrap.public static Collection<MethodInfo> fromConstructors(Constructor<?>[] constructors)
constructors - - array of constructors.public static List<MethodInfo> fromConstructors(Collection<Constructor<?>> constructors)
constructors - - list of constructors.public String toString()
toString in class ObjectMethod.toString(),
Constructor.toString()public abstract String toGenericString()
Method.toGenericString(),
Constructor.toGenericString()public abstract Class<?>[] getExceptionTypes()
Method.getExceptionTypes(),
Constructor.getExceptionTypes()public abstract Class<?> getReturnType()
This is always Void for constructors.
Method.getReturnType()public abstract Class<?>[] getParameterTypes()
Method.getParameterTypes(),
Constructor.getParameterTypes()public abstract boolean isConstructor()
Copyright © 2012–2017 Comphenix and dmulloy2. Licensed under the GNU GPL v2.