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()
AnnotationTarget
ClassInfo
if it is of kind CLASS
asClass
in interface AnnotationTarget
public final FieldInfo asField()
AnnotationTarget
FieldInfo
if it is of kind FIELD
asField
in interface AnnotationTarget
public final MethodInfo asMethod()
AnnotationTarget
MethodInfo
if it is of kind METHOD
asMethod
in interface AnnotationTarget
public final MethodParameterInfo asMethodParameter()
AnnotationTarget
MethodParameterInfo
if it is of kind METHOD_PARAMETER
asMethodParameter
in interface AnnotationTarget
public final TypeTarget asType()
AnnotationTarget
TypeTarget
if it is of kind TYPE
asType
in interface AnnotationTarget
public AnnotationTarget.Kind kind()
AnnotationTarget
kind
in interface AnnotationTarget
Copyright © 2018 JBoss by Red Hat. All rights reserved.