public class EmptyTypeTarget extends TypeTarget
Consider the following example involving a type target using the "Bar" annotation:
public List<@Bar T> foo { return foo; }
This example would be represented as an EmptyTypeTarget with an enclosing target of Foo's
MethodInfo, and isReceiver would return false.TypeTarget.UsageAnnotationTarget.Kind| Modifier and Type | Field and Description |
|---|---|
private boolean |
receiver |
| Constructor and Description |
|---|
EmptyTypeTarget(AnnotationTarget enclosingTarget,
boolean receiver) |
EmptyTypeTarget(AnnotationTarget enclosingTarget,
Type target,
boolean receiver) |
| Modifier and Type | Method and Description |
|---|---|
EmptyTypeTarget |
asEmpty() |
boolean |
isReceiver()
Returns whether the type occurs within a method receiver (the "this" reference the method receives).
|
TypeTarget.Usage |
usage()
Returns the kind of usage of this type target.
|
asClass, asClassExtends, asField, asMethod, asMethodParameter, asMethodParameterType, asThrows, asType, asTypeParameter, asTypeParameterBound, enclosingTarget, kind, setTarget, targetEmptyTypeTarget(AnnotationTarget enclosingTarget, boolean receiver)
EmptyTypeTarget(AnnotationTarget enclosingTarget, Type target, boolean receiver)
public boolean isReceiver()
public final TypeTarget.Usage usage()
TypeTargetgetClass() comparisons.usage in class TypeTargetpublic EmptyTypeTarget asEmpty()
asEmpty in class TypeTarget