public enum TargetType extends Enum<TargetType>
This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
Enum Constant and Description |
---|
CAST
For annotations on a typecast.
|
CLASS_EXTENDS
For annotations on the type of an "extends" or "implements" clause.
|
CLASS_TYPE_PARAMETER
For annotations on a class type parameter declaration.
|
CLASS_TYPE_PARAMETER_BOUND
For annotations on a bound of a type parameter of a class.
|
CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT
For annotations on a type argument of an object creation expression.
|
CONSTRUCTOR_REFERENCE
For annotations on a constructor reference receiver.
|
CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT
For annotations on a type argument of a constructor reference.
|
EXCEPTION_PARAMETER
For annotations on an exception parameter.
|
FIELD
For annotations on a field.
|
INSTANCEOF
For annotations on a type test.
|
LOCAL_VARIABLE
For annotations on a local variable.
|
METHOD_FORMAL_PARAMETER
For annotations on a method parameter.
|
METHOD_INVOCATION_TYPE_ARGUMENT
For annotations on a type argument of a method call.
|
METHOD_RECEIVER
For annotations on the method receiver.
|
METHOD_REFERENCE
For annotations on a method reference receiver.
|
METHOD_REFERENCE_TYPE_ARGUMENT
For annotations on a type argument of a method reference.
|
METHOD_RETURN
For annotations on a method return type.
|
METHOD_TYPE_PARAMETER
For annotations on a method type parameter declaration.
|
METHOD_TYPE_PARAMETER_BOUND
For annotations on a bound of a type parameter of a method.
|
NEW
For annotations on an object creation expression.
|
RESOURCE_VARIABLE
For annotations on a resource variable.
|
THROWS
For annotations on a throws clause in a method declaration.
|
UNKNOWN
For annotations with an unknown target.
|
Modifier and Type | Method and Description |
---|---|
static TargetType |
fromTargetTypeValue(int tag) |
boolean |
isLocal()
Returns whether or not this TargetType represents an annotation whose
target is exclusively a tree in a method body
Note: wildcard bound targets could target a local tree and a class
member declaration signature tree
|
static boolean |
isValidTargetTypeValue(int tag) |
int |
targetTypeValue() |
static TargetType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TargetType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TargetType CLASS_TYPE_PARAMETER
public static final TargetType METHOD_TYPE_PARAMETER
public static final TargetType CLASS_EXTENDS
public static final TargetType CLASS_TYPE_PARAMETER_BOUND
public static final TargetType METHOD_TYPE_PARAMETER_BOUND
public static final TargetType FIELD
public static final TargetType METHOD_RETURN
public static final TargetType METHOD_RECEIVER
public static final TargetType METHOD_FORMAL_PARAMETER
public static final TargetType THROWS
public static final TargetType LOCAL_VARIABLE
public static final TargetType RESOURCE_VARIABLE
public static final TargetType EXCEPTION_PARAMETER
public static final TargetType INSTANCEOF
public static final TargetType NEW
public static final TargetType CONSTRUCTOR_REFERENCE
public static final TargetType METHOD_REFERENCE
public static final TargetType CAST
public static final TargetType CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT
public static final TargetType METHOD_INVOCATION_TYPE_ARGUMENT
public static final TargetType CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT
public static final TargetType METHOD_REFERENCE_TYPE_ARGUMENT
public static final TargetType UNKNOWN
public static TargetType[] values()
for (TargetType c : TargetType.values()) System.out.println(c);
public static TargetType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean isLocal()
public int targetTypeValue()
public static boolean isValidTargetTypeValue(int tag)
public static TargetType fromTargetTypeValue(int tag)
Copyright © 2015. All rights reserved.