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,
boolean mayApplyArrayContentsDefaultNullness)
Retrieve the type annotations at the current position
reached by invocations of toXYZ() methods.
|
protected TypeAnnotationWalker |
restrict(long newMatches,
int newPathPtr) |
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.
|
protected ITypeAnnotationWalker |
toNextDetail(int detailKind) |
ITypeAnnotationWalker |
toSupertype(short index,
char[] superTypeSignature)
Walk to the specified supertype either index based or name based:
|
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).
|
ITypeAnnotationWalker |
toWildcardBound()
Walk to the bound of a wildcard.
|
static ITypeAnnotationWalker |
updateWalkerForParamNonNullDefault(ITypeAnnotationWalker walker,
int defaultNullness,
LookupEnvironment environment) |
toNextNestedType, toReceiver, toTarget, toThrowspublic 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 toSupertype(short index, char[] superTypeSignature)
TypeAnnotationWalker(superTypesSignature is ignored in this implementation).
toSupertype in interface ITypeAnnotationWalkertoSupertype in class TypeAnnotationWalkerindex - -1 is superclass, else index into the list of superinterfacessuperTypeSignature - name and type arguments of the super type to visitpublic ITypeAnnotationWalker toMethodParameter(short index)
ITypeAnnotationWalkertoMethodParameter in interface ITypeAnnotationWalkertoMethodParameter in class TypeAnnotationWalkerpublic ITypeAnnotationWalker toField()
ITypeAnnotationWalkertoField in interface ITypeAnnotationWalkertoField 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 toWildcardBound()
ITypeAnnotationWalkertoWildcardBound in interface ITypeAnnotationWalkertoWildcardBound 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 parameterprotected ITypeAnnotationWalker toNextDetail(int detailKind)
toNextDetail in class TypeAnnotationWalkerpublic IBinaryAnnotation[] getAnnotationsAtCursor(int currentTypeId, boolean mayApplyArrayContentsDefaultNullness)
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.public ITypeAnnotationWalker toNextArrayDimension()
ITypeAnnotationWalkertoNextArrayDimension in interface ITypeAnnotationWalkertoNextArrayDimension in class TypeAnnotationWalkerpublic static ITypeAnnotationWalker updateWalkerForParamNonNullDefault(ITypeAnnotationWalker walker, int defaultNullness, LookupEnvironment environment)