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.Usage
AnnotationTarget.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, target
EmptyTypeTarget(AnnotationTarget enclosingTarget, boolean receiver)
EmptyTypeTarget(AnnotationTarget enclosingTarget, Type target, boolean receiver)
public boolean isReceiver()
public final TypeTarget.Usage usage()
TypeTarget
getClass()
comparisons.usage
in class TypeTarget
public EmptyTypeTarget asEmpty()
asEmpty
in class TypeTarget