Save This Page
Home » openjdk-7 » com.sun.tools » javac » code » [javadoc | source]
com.sun.tools.javac.code
public enum class: TargetType [javadoc | source]
java.lang.Enum
   com.sun.tools.javac.code.TargetType
Describes the type of program element an extended annotation (or extended compound attribute) targets. By comparison, a Tree.Kind has enum values for all elements in the AST, and it does not provide enough resolution for type arguments (i.e., whether an annotation targets a type argument in a local variable, method return type, or a typecast).

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.
Nested Class Summary:
static enum class  TargetType.TargetAttribute   
Field Summary
public  TargetType TYPECAST    For annotations on typecasts. 
public  TargetType TYPECAST_GENERIC_OR_ARRAY    For annotations on a type argument or nested array of a typecast. 
public  TargetType INSTANCEOF    For annotations on type tests. 
public  TargetType INSTANCEOF_GENERIC_OR_ARRAY    For annotations on a type argument or nested array of a type test. 
public  TargetType NEW    For annotations on object creation expressions. 
public  TargetType NEW_GENERIC_OR_ARRAY    For annotations on a type argument or nested array of an object creation expression. 
public  TargetType METHOD_RECEIVER    For annotations on the method receiver. 
public  TargetType LOCAL_VARIABLE    For annotations on local variables. 
public  TargetType LOCAL_VARIABLE_GENERIC_OR_ARRAY    For annotations on a type argument or nested array of a local. 
public  TargetType METHOD_RETURN_GENERIC_OR_ARRAY    For annotations on a type argument or nested array of a method return type. 
public  TargetType METHOD_PARAMETER_GENERIC_OR_ARRAY    For annotations on a type argument or nested array of a method parameter. 
public  TargetType FIELD_GENERIC_OR_ARRAY    For annotations on a type argument or nested array of a field. 
public  TargetType CLASS_TYPE_PARAMETER_BOUND    For annotations on a bound of a type parameter of a class. 
public  TargetType CLASS_TYPE_PARAMETER_BOUND_GENERIC_OR_ARRAY    For annotations on a type argument or nested array of a bound of a type parameter of a class. 
public  TargetType METHOD_TYPE_PARAMETER_BOUND    For annotations on a bound of a type parameter of a method. 
public  TargetType METHOD_TYPE_PARAMETER_BOUND_GENERIC_OR_ARRAY    For annotations on a type argument or nested array of a bound of a type parameter of a method. 
public  TargetType CLASS_EXTENDS    For annotations on the type of an "extends" or "implements" clause. 
public  TargetType CLASS_EXTENDS_GENERIC_OR_ARRAY    For annotations on the inner type of an "extends" or "implements" clause. 
public  TargetType THROWS    For annotations on a throws clause in a method declaration. 
public  TargetType NEW_TYPE_ARGUMENT    For annotations in type arguments of object creation expressions. 
public  TargetType NEW_TYPE_ARGUMENT_GENERIC_OR_ARRAY     
public  TargetType METHOD_TYPE_ARGUMENT     
public  TargetType METHOD_TYPE_ARGUMENT_GENERIC_OR_ARRAY     
public  TargetType WILDCARD_BOUND     
public  TargetType WILDCARD_BOUND_GENERIC_OR_ARRAY     
public  TargetType CLASS_LITERAL     
public  TargetType CLASS_LITERAL_GENERIC_OR_ARRAY     
public  TargetType METHOD_TYPE_PARAMETER     
public  TargetType CLASS_TYPE_PARAMETER     
public  TargetType UNKNOWN    For annotations with an unknown target. 
public static final  int MAXIMUM_TARGET_TYPE_VALUE     
Constructor:
 TargetType(int targetTypeValue,
    TargetAttribute attributes) 
Method from com.sun.tools.javac.code.TargetType Summary:
fromTargetTypeValue,   getGenericComplement,   hasBound,   hasLocation,   hasParameter,   isLocal,   isValidTargetTypeValue,   targetTypeValue
Method from com.sun.tools.javac.code.TargetType Detail:
 public static TargetType fromTargetTypeValue(int tag) 
 public TargetType getGenericComplement() 
 public boolean hasBound() 
    Returns whether or not this TargetType represents an annotation whose target is a type parameter bound.
 public boolean hasLocation() 
    Returns whether or not this TargetType represents an annotation whose target is an inner type of a generic or array type.
 public boolean hasParameter() 
    Returns whether or not this TargetType represents an annotation whose target has a parameter index.
 public 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
 public static boolean isValidTargetTypeValue(int tag) 
 public int targetTypeValue()