Top Description Inners Fields Constructors Methods
com.sun.tools.javac.code

public Class TypeAnnotationPosition

extends Object
Class Inheritance
Imports
java.util.Iterator, com.sun.tools.javac.tree.JCTree.JCLambda, com.sun.tools.javac.util.*

A type annotation position.

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 and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static enum

Field Summary

Modifier and TypeField and Description
public final int
public static final List<TypeAnnotationPosition.TypePathEntry>
private int
private int
public boolean
public List<TypeAnnotationPosition.TypePathEntry>
public int[]
public int[]
public int[]
public int
public final JCTree.JCLambda
public int
public final int
public final TargetType
public final int
public static final TypeAnnotationPosition

Constructor Summary

AccessConstructor and Description
private
TypeAnnotationPosition(final TargetType ttype, final int pos, final int parameter_index, final JCTree.JCLambda onLambda, final int type_index, final int bound_index, final List<TypeAnnotationPosition.TypePathEntry> location)

Method Summary

Modifier and TypeMethod and Description
public static TypeAnnotationPosition
classExtends(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
,
final JCTree.JCLambda
The lambda for this variable.
onLambda
,
final int
The index of the interface.
type_index
,
final int
The position from the associated tree node.
pos
)

Create a TypeAnnotationPosition for a class extension.

public static TypeAnnotationPosition
classExtends(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
,
final JCTree.JCLambda
The lambda for this variable.
onLambda
,
final int
The position from the associated tree node.
pos
)

Create a TypeAnnotationPosition for a class extension.

public static TypeAnnotationPosition
classExtends(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
,
final int
The index of the interface.
type_index
)

Create a TypeAnnotationPosition for a class extension.

public static TypeAnnotationPosition
classExtends(final int
The index of the interface.
type_index
,
final int
The position from the associated tree node.
pos
)

Create a TypeAnnotationPosition for a class extension.

public static TypeAnnotationPosition
classExtends(final int
The position from the associated tree node.
pos
)

Create a TypeAnnotationPosition for a class extension.

public static TypeAnnotationPosition
constructorInvocationTypeArg(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
,
final JCTree.JCLambda
The lambda for this variable.
onLambda
,
final int
The index of the type argument.
type_index
,
final int
The position from the associated tree node.
pos
)

Create a TypeAnnotationPosition for a constructor invocation type argument.

public static TypeAnnotationPosition
constructorInvocationTypeArg(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
,
final int
The index of the type argument.
type_index
)

Create a TypeAnnotationPosition for a constructor invocation type argument.

public static TypeAnnotationPosition
constructorRef(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
,
final JCTree.JCLambda
The lambda for this constructor reference.
onLambda
,
final int
The position from the associated tree node.
pos
)

Create a TypeAnnotationPosition for a constructor reference.

public static TypeAnnotationPosition
constructorRef(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
)

Create a TypeAnnotationPosition for a constructor reference.

public static TypeAnnotationPosition
constructorRefTypeArg(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
,
final JCTree.JCLambda
The lambda for this variable.
onLambda
,
final int
The index of the type argument.
type_index
,
final int
The position from the associated tree node.
pos
)

Create a TypeAnnotationPosition for a constructor reference type argument.

public static TypeAnnotationPosition
constructorRefTypeArg(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
,
final int
The index of the type argument.
type_index
)

Create a TypeAnnotationPosition for a constructor reference type argument.

public boolean

Returns:

true if the target has not been optimized away
emitToClassfile
()

Indicates whether the target tree of the annotation has been optimized away from classfile or not.

public static TypeAnnotationPosition
exceptionParameter(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
,
final JCTree.JCLambda
The lambda for this parameter.
onLambda
,
final int
The position from the associated tree node.
pos
)

Create a TypeAnnotationPosition for an exception parameter.

public static TypeAnnotationPosition
exceptionParameter(final JCTree.JCLambda
The lambda for this parameter.
onLambda
,
final int
The position from the associated tree node.
pos
)

Create a TypeAnnotationPosition for an exception parameter.

public static TypeAnnotationPosition
exceptionParameter(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
)

Create a TypeAnnotationPosition for an exception parameter.

public static TypeAnnotationPosition
field(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
,
final JCTree.JCLambda
The lambda for this variable.
onLambda
,
final int
The position from the associated tree node.
pos
)

Create a TypeAnnotationPosition for a field.

public static TypeAnnotationPosition
field(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
)

Create a TypeAnnotationPosition for a field.

public static TypeAnnotationPosition
field(final int
The position from the associated tree node.
pos
)

Create a TypeAnnotationPosition for a field.

public static List<Integer>
public int
public int
public int
public static List<TypeAnnotationPosition.TypePathEntry>
getTypePathFromBinary(List<Integer>
The bytecode representation of the type path.
list
)

Decode the binary representation for a type path and set the location field.

public boolean
public boolean
public static TypeAnnotationPosition
instanceOf(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
,
final JCTree.JCLambda
The lambda for this variable.
onLambda
,
final int
The position from the associated tree node.
pos
)

Create a TypeAnnotationPosition for an instanceof.

public static TypeAnnotationPosition
instanceOf(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
)

Create a TypeAnnotationPosition for an instanceof.

public static TypeAnnotationPosition
localVariable(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
,
final JCTree.JCLambda
The lambda for this variable.
onLambda
,
final int
The position from the associated tree node.
pos
)

Create a TypeAnnotationPosition for a local variable.

public static TypeAnnotationPosition
localVariable(final JCTree.JCLambda
The lambda for this variable.
onLambda
,
final int
The position from the associated tree node.
pos
)

Create a TypeAnnotationPosition for a local variable.

public static TypeAnnotationPosition
localVariable(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
)

Create a TypeAnnotationPosition for a local variable.

public boolean
matchesPos(int pos)

public static TypeAnnotationPosition
methodInvocationTypeArg(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
,
final JCTree.JCLambda
The lambda for this variable.
onLambda
,
final int
The index of the type argument.
type_index
,
final int
The position from the associated tree node.
pos
)

Create a TypeAnnotationPosition for a method invocation type argument.

public static TypeAnnotationPosition
methodInvocationTypeArg(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
,
final int
The index of the type argument.
type_index
)

Create a TypeAnnotationPosition for a method invocation type argument.

public static TypeAnnotationPosition
methodParameter(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
,
final JCTree.JCLambda
The lambda for this parameter.
onLambda
,
final int
The index of the parameter.
parameter_index
,
final int
The position from the associated tree node.
pos
)

Create a TypeAnnotationPosition for a method formal parameter.

public static TypeAnnotationPosition
methodParameter(final JCTree.JCLambda
The lambda for this parameter.
onLambda
,
final int
The index of the parameter.
parameter_index
,
final int
The position from the associated tree node.
pos
)

Create a TypeAnnotationPosition for a method formal parameter.

public static TypeAnnotationPosition
methodParameter(final int
The index of the parameter.
parameter_index
,
final int
The position from the associated tree node.
pos
)

Create a TypeAnnotationPosition for a method formal parameter.

public static TypeAnnotationPosition
methodParameter(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
,
final int
The index of the parameter.
parameter_index
)

Create a TypeAnnotationPosition for a method formal parameter.

public static TypeAnnotationPosition
methodReceiver(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
,
final JCTree.JCLambda
The lambda for this parameter.
onLambda
,
final int
The position from the associated tree node.
pos
)

Create a TypeAnnotationPosition for a method receiver parameter.

public static TypeAnnotationPosition
methodReceiver(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
)

Create a TypeAnnotationPosition for a method receiver parameter.

public static TypeAnnotationPosition
methodReceiver(final int
The position from the associated tree node.
pos
)

Create a TypeAnnotationPosition for a method receiver parameter.

public static TypeAnnotationPosition
methodRef(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
,
final JCTree.JCLambda
The lambda for this method reference.
onLambda
,
final int
The position from the associated tree node.
pos
)

Create a TypeAnnotationPosition for a method reference.

public static TypeAnnotationPosition
methodRef(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
)

Create a TypeAnnotationPosition for a method reference.

public static TypeAnnotationPosition
methodRefTypeArg(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
,
final JCTree.JCLambda
The lambda for this variable.
onLambda
,
final int
The index of the type argument.
type_index
,
final int
The position from the associated tree node.
pos
)

Create a TypeAnnotationPosition for a method reference type argument.

public static TypeAnnotationPosition
methodRefTypeArg(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
,
final int
The index of the type argument.
type_index
)

Create a TypeAnnotationPosition for a method reference type argument.

public static TypeAnnotationPosition
methodReturn(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
,
final JCTree.JCLambda
The lambda for this parameter.
onLambda
,
final int
The position from the associated tree node.
pos
)

Create a TypeAnnotationPosition for a method return.

public static TypeAnnotationPosition
methodReturn(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
)

Create a TypeAnnotationPosition for a method return.

public static TypeAnnotationPosition
methodReturn(final int
The position from the associated tree node.
pos
)

Create a TypeAnnotationPosition for a method return.

public static TypeAnnotationPosition
methodThrows(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
,
final JCTree.JCLambda
The lambda for this variable.
onLambda
,
final int
The index of the exception.
type_index
,
final int
The position from the associated tree node.
pos
)

Create a TypeAnnotationPosition for a throws clause.

public static TypeAnnotationPosition
methodThrows(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
,
final int
The index of the exception.
type_index
)

Create a TypeAnnotationPosition for a throws clause.

public static TypeAnnotationPosition
methodTypeParameter(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
,
final JCTree.JCLambda
The lambda for this variable.
onLambda
,
final int
The index of the type parameter.
parameter_index
,
final int
The position from the associated tree node.
pos
)

Create a TypeAnnotationPosition for a method type parameter.

public static TypeAnnotationPosition
methodTypeParameter(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
,
final int
The index of the type parameter.
parameter_index
)

Create a TypeAnnotationPosition for a method type parameter.

public static TypeAnnotationPosition
methodTypeParameterBound(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
,
final JCTree.JCLambda
The lambda for this variable.
onLambda
,
final int
The index of the type parameter.
parameter_index
,
final int
The index of the type parameter bound.
bound_index
,
final int
The position from the associated tree node.
pos
)

Create a TypeAnnotationPosition for a method type parameter bound.

public static TypeAnnotationPosition
methodTypeParameterBound(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
,
final int
The index of the type parameter.
parameter_index
,
final int
The index of the type parameter bound.
bound_index
)

Create a TypeAnnotationPosition for a method type parameter bound.

public static TypeAnnotationPosition
newObj(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
,
final JCTree.JCLambda
The lambda for this variable.
onLambda
,
final int
The position from the associated tree node.
pos
)

Create a TypeAnnotationPosition for a new.

public static TypeAnnotationPosition
newObj(final int
The position from the associated tree node.
pos
)

Create a TypeAnnotationPosition for a new.

public static TypeAnnotationPosition
newObj(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
)

Create a TypeAnnotationPosition for a new.

public static TypeAnnotationPosition
resourceVariable(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
,
final JCTree.JCLambda
The lambda for this variable.
onLambda
,
final int
The position from the associated tree node.
pos
)

Create a TypeAnnotationPosition for a resource variable.

public static TypeAnnotationPosition
resourceVariable(final JCTree.JCLambda
The lambda for this variable.
onLambda
,
final int
The position from the associated tree node.
pos
)

Create a TypeAnnotationPosition for a resource variable.

public static TypeAnnotationPosition
resourceVariable(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
)

Create a TypeAnnotationPosition for a resource variable.

public void
setCatchInfo(final int catchType, final int startPos)

public void
setExceptionIndex(final int exception_index)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public static TypeAnnotationPosition
typeCast(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
,
final JCTree.JCLambda
The lambda for this variable.
onLambda
,
final int
The index into an intersection type.
type_index
,
final int
The position from the associated tree node.
pos
)

Create a TypeAnnotationPosition for a type cast.

public static TypeAnnotationPosition
typeCast(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
,
final int
The index into an intersection type.
type_index
)

Create a TypeAnnotationPosition for a type cast.

public static TypeAnnotationPosition
typeParameter(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
,
final JCTree.JCLambda
The lambda for this variable.
onLambda
,
final int
The index of the type parameter.
parameter_index
,
final int
The position from the associated tree node.
pos
)

Create a TypeAnnotationPosition for a type parameter.

public static TypeAnnotationPosition
typeParameter(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
,
final int
The index of the type parameter.
parameter_index
)

Create a TypeAnnotationPosition for a type parameter.

public static TypeAnnotationPosition
typeParameterBound(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
,
final JCTree.JCLambda
The lambda for this variable.
onLambda
,
final int
The index of the type parameter.
parameter_index
,
final int
The index of the type parameter bound.
bound_index
,
final int
The position from the associated tree node.
pos
)

Create a TypeAnnotationPosition for a type parameter bound.

public static TypeAnnotationPosition
typeParameterBound(final List<TypeAnnotationPosition.TypePathEntry>
The type path.
location
,
final int
The index of the type parameter.
parameter_index
,
final int
The index of the type parameter bound.
bound_index
)

Create a TypeAnnotationPosition for a type parameter bound.

public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait