Top Description Fields Constructors Methods
javassist.bytecode.annotation

public Class TypeAnnotationsWriter

extends AnnotationsWriter
Class Inheritance
Imports
java.io.IOException, .OutputStream, javassist.bytecode.ConstPool

A convenience class for constructing a ..TypeAnnotations_attribute. See the source code of the javassist.bytecode.TypeAnnotationsAttribute class.
Since
3.19

Field Summary

Inherited from javassist.bytecode.annotation.AnnotationsWriter:
output

Constructor Summary

AccessConstructor and Description
public
TypeAnnotationsWriter(OutputStream
the output stream.
os
,
ConstPool
the constant pool.
cp
)

Constructs with the given output stream.

Method Summary

Modifier and TypeMethod and Description
public void
catchTarget(int exceptionTableIndex)

Writes target_type and catch_target of target_info union.

public void
emptyTarget(int targetType)

Writes target_type and empty_target of target_info union.

public void
formalParameterTarget(int formalParameterIndex)

Writes target_type and type_parameter_target of target_info union.

public void
localVarTarget(int targetType, int tableLength)

Writes target_type and localvar_target of target_info union.

public void
localVarTargetTable(int startPc, int length, int index)

Writes an element of table[] of localvar_target of target_info union.

public void
numAnnotations(int num)

Overrides javassist.bytecode.annotation.AnnotationsWriter.numAnnotations.

Writes num_annotations in Runtime(In)VisibleTypeAnnotations_attribute.

public void
offsetTarget(int targetType, int offset)

Writes target_type and offset_target of target_info union.

public void
supertypeTarget(int supertypeIndex)

Writes target_type and supertype_target of target_info union.

public void
throwsTarget(int throwsTypeIndex)

Writes target_type and throws_target of target_info union.

public void
typeArgumentTarget(int targetType, int offset, int type_argument_index)

Writes target_type and type_argument_target of target_info union.

public void
typeParameterBoundTarget(int targetType, int typeParameterIndex, int boundIndex)

Writes target_type and type_parameter_bound_target of target_info union.

public void
typeParameterTarget(int targetType, int typeParameterIndex)

Writes target_type and type_parameter_target of target_info union.

public void
typePath(int pathLength)

Writes path_length of type_path.

public void
typePathPath(int typePathKind, int typeArgumentIndex)

Writes an element of path[] of type_path.

Inherited from javassist.bytecode.annotation.AnnotationsWriter:
annotationannotationannotationValuearrayValueclassInfoIndexclassInfoIndexcloseconstValueIndexconstValueIndexconstValueIndexconstValueIndexconstValueIndexconstValueIndexconstValueIndexconstValueIndexconstValueIndexconstValueIndexenumConstValueenumConstValuegetConstPoolmemberValuePairmemberValuePairnumParameterswrite16bit

Constructor Detail

TypeAnnotationsWriterback to summary
public TypeAnnotationsWriter(OutputStream os, ConstPool cp)

Constructs with the given output stream.

Parameters
os:OutputStream

the output stream.

cp:ConstPool

the constant pool.

Method Detail

catchTargetback to summary
public void catchTarget(int exceptionTableIndex) throws IOException

Writes target_type and catch_target of target_info union.

emptyTargetback to summary
public void emptyTarget(int targetType) throws IOException

Writes target_type and empty_target of target_info union.

formalParameterTargetback to summary
public void formalParameterTarget(int formalParameterIndex) throws IOException

Writes target_type and type_parameter_target of target_info union.

localVarTargetback to summary
public void localVarTarget(int targetType, int tableLength) throws IOException

Writes target_type and localvar_target of target_info union. It must be followed by tableLength calls to localVarTargetTable.

localVarTargetTableback to summary
public void localVarTargetTable(int startPc, int length, int index) throws IOException

Writes an element of table[] of localvar_target of target_info union.

numAnnotationsback to summary
public void numAnnotations(int num) throws IOException

Overrides javassist.bytecode.annotation.AnnotationsWriter.numAnnotations.

Writes num_annotations in Runtime(In)VisibleTypeAnnotations_attribute. It must be followed by num instances of type_annotation.

Annotations
@Override
offsetTargetback to summary
public void offsetTarget(int targetType, int offset) throws IOException

Writes target_type and offset_target of target_info union.

supertypeTargetback to summary
public void supertypeTarget(int supertypeIndex) throws IOException

Writes target_type and supertype_target of target_info union.

throwsTargetback to summary
public void throwsTarget(int throwsTypeIndex) throws IOException

Writes target_type and throws_target of target_info union.

typeArgumentTargetback to summary
public void typeArgumentTarget(int targetType, int offset, int type_argument_index) throws IOException

Writes target_type and type_argument_target of target_info union.

typeParameterBoundTargetback to summary
public void typeParameterBoundTarget(int targetType, int typeParameterIndex, int boundIndex) throws IOException

Writes target_type and type_parameter_bound_target of target_info union.

typeParameterTargetback to summary
public void typeParameterTarget(int targetType, int typeParameterIndex) throws IOException

Writes target_type and type_parameter_target of target_info union.

typePathback to summary
public void typePath(int pathLength) throws IOException

Writes path_length of type_path.

typePathPathback to summary
public void typePathPath(int typePathKind, int typeArgumentIndex) throws IOException

Writes an element of path[] of type_path.