public final class MethodParameterInfo extends Object implements AnnotationTarget
Thread-Safety
This class is immutable and can be shared between threads without safe publication.AnnotationTarget.Kind| Modifier and Type | Method and Description |
|---|---|
ClassInfo |
asClass()
Casts and returns this target as a
ClassInfo if it is of kind CLASS |
FieldInfo |
asField()
Casts and returns this target as a
FieldInfo if it is of kind FIELD |
MethodInfo |
asMethod()
Casts and returns this target as a
MethodInfo if it is of kind METHOD |
MethodParameterInfo |
asMethodParameter()
Casts and returns this target as a
MethodParameterInfo if it is of kind METHOD_PARAMETER |
TypeTarget |
asType()
Casts and returns this target as a
TypeTarget if it is of kind TYPE |
static MethodParameterInfo |
create(MethodInfo method,
short parameter)
Constructs a new mock method parameter info
|
AnnotationTarget.Kind |
kind()
Returns the kind of object this target represents.
|
MethodInfo |
method()
Returns the method this parameter belongs to.
|
short |
position()
Returns the 0 based position of this parameter.
|
String |
toString()
Returns a string representation describing this method parameter
|
public static MethodParameterInfo create(MethodInfo method, short parameter)
method - the method containing this parameter.parameter - the zero based index of this parameterpublic final MethodInfo method()
public final short position()
public String toString()
public final ClassInfo asClass()
AnnotationTargetClassInfo if it is of kind CLASSasClass in interface AnnotationTargetpublic final FieldInfo asField()
AnnotationTargetFieldInfo if it is of kind FIELDasField in interface AnnotationTargetpublic final MethodInfo asMethod()
AnnotationTargetMethodInfo if it is of kind METHODasMethod in interface AnnotationTargetpublic final MethodParameterInfo asMethodParameter()
AnnotationTargetMethodParameterInfo if it is of kind METHOD_PARAMETERasMethodParameter in interface AnnotationTargetpublic final TypeTarget asType()
AnnotationTargetTypeTarget if it is of kind TYPEasType in interface AnnotationTargetpublic AnnotationTarget.Kind kind()
AnnotationTargetkind in interface AnnotationTargetCopyright © 2016 JBoss by Red Hat. All rights reserved.