|
TUM CCSM Commons | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.tum.cs.commons.reflect.FormalParameter
public final class FormalParameter
This class models formal method parameters to allow convenient reflective
access as the Java Reflection API does not model them explicitly.
Instances of this class can be obtained via
ReflectionUtils.getFormalParameters(Method).
ReflectionUtils.getFormalParameters(Method),
ReflectionUtils.invoke(Method, Object, java.util.Map)| Method Summary | ||
|---|---|---|
boolean |
equals(Object object)
Two formal parameters are equal if their declaring methods and their position within the formal parameter list are equal. |
|
|
getAnnotation(Class<A> annotationClass)
Returns this element's annotation for the specified type if such an annotation is present, else null. |
|
Annotation[] |
getAnnotations()
Get parameter annotations. |
|
Type |
getGenericType()
Get generic parameter type. |
|
Method |
getMethod()
Get the method that declares this formal parameter. |
|
int |
getPosition()
Get the position of the formal parameter within the methods parameter list. |
|
Class<?> |
getType()
Get parameter type. |
|
int |
hashCode()
The hashcode is computed as the exclusive-or of the method's hashcode and (position+1). |
|
boolean |
isAnnotationPresent(Class<? extends Annotation> annotationClass)
Returns true if an annotation of the specified type is
defined for this formal parameter. |
|
String |
toString()
Returns method name, position and type. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public Method getMethod()
public Class<?> getType()
public Type getGenericType()
public Annotation[] getAnnotations()
public int getPosition()
public int hashCode()
hashCode in class Objectpublic <A extends Annotation> A getAnnotation(Class<A> annotationClass)
null.
public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass)
true if an annotation of the specified type is
defined for this formal parameter.
public boolean equals(Object object)
equals in class Objectpublic String toString()
toString in class Object
|
TUM CCSM Commons | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||