Top Description Fields Constructors Methods
org.jboss.jandex

public Class TypeParameterBoundTypeTarget

extends TypeParameterTypeTarget
Class Inheritance

Represents a target of type annotation which occurs within a bound of type parameter. This class conveys the zero-based position of the type parameter, the zero-based position of the bound, and finally, the enclosing method or class where it occurs. Since type targets can appear at any depth of the type tree at this location, the corresponding type reference is also included.

Consider the following example involving a type target using the Bar annotation:

public <T extends Number & @Bar Serializable> void foo(List<T> l) { ... }

This example would be represented as a TypeParameterBoundTypeTarget with an enclosing target of the MethodInfo of foo, position() would be 0 and boundPosition() would be 1.

Author
Jason T. Greene
Since
2.0

Field Summary

Modifier and TypeField and Description
private boolean
private short

Constructor Summary

AccessConstructor and Description
pack-priv
TypeParameterBoundTypeTarget(AnnotationTarget enclosingTarget, int position, int boundPosition)

pack-priv
TypeParameterBoundTypeTarget(AnnotationTarget enclosingTarget, Type target, int position, int boundPosition)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
public TypeParameterBoundTypeTarget
asTypeParameterBound()

Overrides org.jboss.jandex.TypeTarget.asTypeParameterBound.

Casts and returns this type target as a TypeParameterBoundTypeTarget.
public final int

Returns:

the index of the bound this type annotation is within
boundPosition
()

Returns the index of the bound this type annotation is within.

public final TypeTarget.Usage
usage()

Overrides org.jboss.jandex.TypeParameterTypeTarget.usage.

Returns the kind of usage of this type target.
Inherited from org.jboss.jandex.TypeParameterTypeTarget:
asTypeParameter

Field Detail

adjustedback to summary
private boolean adjusted
boundPositionback to summary
private short boundPosition

Constructor Detail

TypeParameterBoundTypeTargetback to summary
pack-priv TypeParameterBoundTypeTarget(AnnotationTarget enclosingTarget, int position, int boundPosition)
TypeParameterBoundTypeTargetback to summary
pack-priv TypeParameterBoundTypeTarget(AnnotationTarget enclosingTarget, Type target, int position, int boundPosition)

Method Detail

adjustBoundDownback to summary
pack-priv void adjustBoundDown()
asTypeParameterBoundback to summary
public TypeParameterBoundTypeTarget asTypeParameterBound()

Overrides org.jboss.jandex.TypeTarget.asTypeParameterBound.

Doc from org.jboss.jandex.TypeTarget.asTypeParameterBound.

Casts and returns this type target as a TypeParameterBoundTypeTarget. If this type target is not a TypeParameterBoundTypeTarget, then an exception will be thrown.

Returns:TypeParameterBoundTypeTarget

an instance of TypeParameterBoundTypeTarget

Annotations
@Override
boundPositionback to summary
public final int boundPosition()

Returns the index of the bound this type annotation is within.

Returns:int

the index of the bound this type annotation is within

usageback to summary
public final TypeTarget.Usage usage()

Overrides org.jboss.jandex.TypeParameterTypeTarget.usage.

Doc from org.jboss.jandex.TypeTarget.usage.

Returns the kind of usage of this type target. This allows a caller to use a switch statement as opposed to getClass() comparisons.

Returns:TypeTarget.Usage

the kind of usage of this type target

Annotations
@Override