public interface ITypeAnnotationWalker
| Modifier and Type | Field and Description |
|---|---|
static ITypeAnnotationWalker |
EMPTY_ANNOTATION_WALKER
A no-effect annotation walker, all walking methods are implemented as identity-functions.
|
static IBinaryAnnotation[] |
NO_ANNOTATIONS |
| Modifier and Type | Method and Description |
|---|---|
IBinaryAnnotation[] |
getAnnotationsAtCursor(int currentTypeId)
Retrieve the type annotations at the current position
reached by invocations of toXYZ() methods.
|
ITypeAnnotationWalker |
toField()
Walk to a field.
|
ITypeAnnotationWalker |
toMethodParameter(short index)
Walk to the index'th visible formal method parameter (i.e., not counting synthetic args).
|
ITypeAnnotationWalker |
toMethodReturn()
Walk to the return type of a method.
|
ITypeAnnotationWalker |
toNextArrayDimension()
Descend down one level of array dimensions.
|
ITypeAnnotationWalker |
toNextNestedType()
Descend down one level of type nesting.
|
ITypeAnnotationWalker |
toReceiver()
Walk to the receiver type of a method.
|
ITypeAnnotationWalker |
toSupertype(short index,
char[] superTypeSignature)
Walk to the specified supertype either index based or name based:
|
ITypeAnnotationWalker |
toThrows(int index)
Walk to the throws type at the given index.
|
ITypeAnnotationWalker |
toTypeArgument(int rank)
Walk to the type argument of the given rank.
|
ITypeAnnotationWalker |
toTypeBound(short boundIndex)
Detail of
toTypeParameterBounds(boolean, int): walk to the bounds
of the previously selected type parameter. |
ITypeAnnotationWalker |
toTypeParameter(boolean isClassTypeParameter,
int rank)
Walk to the type parameter of the given rank.
|
ITypeAnnotationWalker |
toTypeParameterBounds(boolean isClassTypeParameter,
int parameterRank)
Walk to the bounds of a type parameter of either a class or a method (signaled by isClassTypeParameter).
|
ITypeAnnotationWalker |
toWildcardBound()
Walk to the bound of a wildcard.
|
static final IBinaryAnnotation[] NO_ANNOTATIONS
static final ITypeAnnotationWalker EMPTY_ANNOTATION_WALKER
ITypeAnnotationWalker toField()
ITypeAnnotationWalker toMethodReturn()
ITypeAnnotationWalker toReceiver()
ITypeAnnotationWalker toTypeParameter(boolean isClassTypeParameter, int rank)
isClassTypeParameter - whether we are looking for a class type parameter (else: method type parameter)rank - rank of the type parameterITypeAnnotationWalker toTypeParameterBounds(boolean isClassTypeParameter, int parameterRank)
toTypeBound(short) on the resulting walker.isClassTypeParameter - whether we are looking at a class type parameter (else: method type parameter)parameterRank - rank of the type parameter.ITypeAnnotationWalker toTypeBound(short boundIndex)
toTypeParameterBounds(boolean, int): walk to the bounds
of the previously selected type parameter.boundIndex - ITypeAnnotationWalker toSupertype(short index, char[] superTypeSignature)
index - -1 is superclass, else index into the list of superinterfacessuperTypeSignature - name and type arguments of the super type to visitITypeAnnotationWalker toMethodParameter(short index)
ITypeAnnotationWalker toThrows(int index)
ITypeAnnotationWalker toTypeArgument(int rank)
ITypeAnnotationWalker toWildcardBound()
ITypeAnnotationWalker toNextArrayDimension()
ITypeAnnotationWalker toNextNestedType()
IBinaryAnnotation[] getAnnotationsAtCursor(int currentTypeId)
currentTypeId - the id of the type being annotated; 0 signals don't care / unknown;
-1 signals if annotating a wildcard or a use of a type variable.