|
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(java.lang.Object object)
Two formal parameters are equal if their declaring methods and their position within the formal parameter list are equal. |
|
|
getAnnotation(java.lang.Class<A> annotationClass)
Returns this element's annotation for the specified type if such an annotation is present, else null . |
|
java.lang.annotation.Annotation[] |
getAnnotations()
Get parameter annotations. |
|
java.lang.reflect.Type |
getGenericType()
Get generic parameter type. |
|
java.lang.reflect.Method |
getMethod()
Get the method that declares this formal parameter. |
|
int |
getPosition()
Get the position of the formal parameter within the methods parameter list. |
|
java.lang.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(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
Returns true if an annotation of the specified type is
defined for this formal parameter. |
|
java.lang.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 java.lang.reflect.Method getMethod()
public java.lang.Class<?> getType()
public java.lang.reflect.Type getGenericType()
public java.lang.annotation.Annotation[] getAnnotations()
public int getPosition()
public int hashCode()
hashCode
in class java.lang.Object
public <A extends java.lang.annotation.Annotation> A getAnnotation(java.lang.Class<A> annotationClass)
null
.
public boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
true
if an annotation of the specified type is
defined for this formal parameter.
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
TUM CCSM Commons | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |