public class TypeAnnotationWalker
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static TypeAnnotationWalker |
EMPTY_ANNOTATION_WALKER
A no-effect annotation walker, all walking methods are implemented as identity-functions.
|
protected long |
matches |
static IBinaryAnnotation[] |
NO_ANNOTATIONS |
protected int |
pathPtr |
protected IBinaryTypeAnnotation[] |
typeAnnotations |
| Modifier | Constructor and Description |
|---|---|
|
TypeAnnotationWalker(IBinaryTypeAnnotation[] typeAnnotations) |
protected |
TypeAnnotationWalker(IBinaryTypeAnnotation[] typeAnnotations,
long matchBits,
int pathPtr) |
| Modifier and Type | Method and Description |
|---|---|
IBinaryAnnotation[] |
getAnnotationsAtCursor(int currentTypeId)
Retrieve the type annotations at the current position
reached by invocations of toXYZ() methods.
|
protected TypeAnnotationWalker |
restrict(long newMatches,
int newPathPtr) |
TypeAnnotationWalker |
toField()
Walk to a field.
|
TypeAnnotationWalker |
toMethodParameter(short index)
Walk to the index'th visible formal method parameter (i.e., not counting synthetic args).
|
TypeAnnotationWalker |
toMethodReturn()
Walk to the return type of a method.
|
TypeAnnotationWalker |
toNextArrayDimension()
Descend down one level of array dimensions.
|
protected TypeAnnotationWalker |
toNextDetail(int detailKind) |
TypeAnnotationWalker |
toNextNestedType()
Descend down one level of type nesting.
|
TypeAnnotationWalker |
toReceiver()
Walk to the receiver type of a method.
|
TypeAnnotationWalker |
toSupertype(short index)
Walk to the specified supertype: -1 is superclass, else the superinterface at the given index.
|
protected TypeAnnotationWalker |
toTarget(int targetType) |
TypeAnnotationWalker |
toThrows(int index)
Walk to the throws type at the given index.
|
TypeAnnotationWalker |
toTypeArgument(int rank)
Walk to the type argument of the given rank.
|
TypeAnnotationWalker |
toTypeBound(short boundIndex)
Detail of
toTypeParameterBounds(boolean, int): walk to the bounds
of the previously selected type parameter. |
TypeAnnotationWalker |
toTypeParameter(boolean isClassTypeParameter,
int rank)
Walk to the type parameter of the given rank.
|
TypeAnnotationWalker |
toTypeParameterBounds(boolean isClassTypeParameter,
int parameterRank)
Walk to the bounds of a type parameter of either a class or a method (signaled by isClassTypeParameter).
|
TypeAnnotationWalker |
toWildcardBound()
Walk to the bound of a wildcard.
|
public static final IBinaryAnnotation[] NO_ANNOTATIONS
public static final TypeAnnotationWalker EMPTY_ANNOTATION_WALKER
protected final IBinaryTypeAnnotation[] typeAnnotations
protected final long matches
protected final int pathPtr
public TypeAnnotationWalker(IBinaryTypeAnnotation[] typeAnnotations)
protected TypeAnnotationWalker(IBinaryTypeAnnotation[] typeAnnotations, long matchBits, int pathPtr)
protected TypeAnnotationWalker restrict(long newMatches, int newPathPtr)
public TypeAnnotationWalker toField()
public TypeAnnotationWalker toMethodReturn()
public TypeAnnotationWalker toReceiver()
protected TypeAnnotationWalker toTarget(int targetType)
public TypeAnnotationWalker toTypeParameter(boolean isClassTypeParameter, int rank)
isClassTypeParameter - whether we are looking for a class type parameter (else: method type type parameter)rank - rank of the type parameterpublic TypeAnnotationWalker toTypeParameterBounds(boolean isClassTypeParameter, int parameterRank)
toTypeBound(short) on the resulting walker.isClassTypeParameter - whether we are looking at a class type parameter (else: method type type parameter)parameterRank - rank of the type parameter.public TypeAnnotationWalker toTypeBound(short boundIndex)
toTypeParameterBounds(boolean, int): walk to the bounds
of the previously selected type parameter.boundIndex - public TypeAnnotationWalker toSupertype(short index)
public TypeAnnotationWalker toMethodParameter(short index)
public TypeAnnotationWalker toThrows(int index)
public TypeAnnotationWalker toTypeArgument(int rank)
public TypeAnnotationWalker toWildcardBound()
public TypeAnnotationWalker toNextArrayDimension()
public TypeAnnotationWalker toNextNestedType()
protected TypeAnnotationWalker toNextDetail(int detailKind)
public IBinaryAnnotation[] getAnnotationsAtCursor(int currentTypeId)