public class NonNullDefaultAwareTypeAnnotationWalker extends TypeAnnotationWalker
matches, pathPtr, typeAnnotationsEMPTY_ANNOTATION_WALKER, NO_ANNOTATIONS| Constructor and Description |
|---|
NonNullDefaultAwareTypeAnnotationWalker(IBinaryTypeAnnotation[] typeAnnotations,
int defaultNullness,
LookupEnvironment environment)
Create initial walker with non-empty type annotations.
|
NonNullDefaultAwareTypeAnnotationWalker(int defaultNullness,
LookupEnvironment environment)
Create an initial walker without 'real' type annotations, but with a nonnull default.
|
| 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) |
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 |
toTypeArgument(int rank)
Walk to the type argument of the given rank.
|
ITypeAnnotationWalker |
toTypeBound(short boundIndex)
Detail of
ITypeAnnotationWalker.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).
|
toField, toNextArrayDimension, toNextDetail, toNextNestedType, toReceiver, toSupertype, toTarget, toThrows, toWildcardBoundpublic NonNullDefaultAwareTypeAnnotationWalker(IBinaryTypeAnnotation[] typeAnnotations, int defaultNullness, LookupEnvironment environment)
public NonNullDefaultAwareTypeAnnotationWalker(int defaultNullness,
LookupEnvironment environment)
protected TypeAnnotationWalker restrict(long newMatches, int newPathPtr)
restrict in class TypeAnnotationWalkerpublic ITypeAnnotationWalker toMethodParameter(short index)
ITypeAnnotationWalkertoMethodParameter in interface ITypeAnnotationWalkertoMethodParameter in class TypeAnnotationWalkerpublic ITypeAnnotationWalker toMethodReturn()
ITypeAnnotationWalkertoMethodReturn in interface ITypeAnnotationWalkertoMethodReturn in class TypeAnnotationWalkerpublic ITypeAnnotationWalker toTypeBound(short boundIndex)
ITypeAnnotationWalkerITypeAnnotationWalker.toTypeParameterBounds(boolean, int): walk to the bounds
of the previously selected type parameter.toTypeBound in interface ITypeAnnotationWalkertoTypeBound in class TypeAnnotationWalkerpublic ITypeAnnotationWalker toTypeParameterBounds(boolean isClassTypeParameter, int parameterRank)
ITypeAnnotationWalkerITypeAnnotationWalker.toTypeBound(short) on the resulting walker.toTypeParameterBounds in interface ITypeAnnotationWalkertoTypeParameterBounds in class TypeAnnotationWalkerisClassTypeParameter - whether we are looking at a class type parameter (else: method type parameter)parameterRank - rank of the type parameter.public ITypeAnnotationWalker toTypeArgument(int rank)
ITypeAnnotationWalkertoTypeArgument in interface ITypeAnnotationWalkertoTypeArgument in class TypeAnnotationWalkerpublic ITypeAnnotationWalker toTypeParameter(boolean isClassTypeParameter, int rank)
ITypeAnnotationWalkertoTypeParameter in interface ITypeAnnotationWalkertoTypeParameter in class TypeAnnotationWalkerisClassTypeParameter - whether we are looking for a class type parameter (else: method type parameter)rank - rank of the type parameterpublic IBinaryAnnotation[] getAnnotationsAtCursor(int currentTypeId)
ITypeAnnotationWalkergetAnnotationsAtCursor in interface ITypeAnnotationWalkergetAnnotationsAtCursor in class TypeAnnotationWalkercurrentTypeId - 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.