Package javassist.bytecode.annotation
Class TypeAnnotationsWriter
- java.lang.Object
-
- javassist.bytecode.annotation.AnnotationsWriter
-
- javassist.bytecode.annotation.TypeAnnotationsWriter
-
public class TypeAnnotationsWriter extends AnnotationsWriter
A convenience class for constructing a..TypeAnnotations_attribute. See the source code of theTypeAnnotationsAttributeclass.- Since:
- 3.19
-
-
Constructor Summary
Constructors Constructor Description TypeAnnotationsWriter(OutputStream os, ConstPool cp)Constructs with the given output stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcatchTarget(int exceptionTableIndex)Writestarget_typeandcatch_targetoftarget_infounion.voidemptyTarget(int targetType)Writestarget_typeandempty_targetoftarget_infounion.voidformalParameterTarget(int formalParameterIndex)Writestarget_typeandtype_parameter_targetoftarget_infounion.voidlocalVarTarget(int targetType, int tableLength)Writestarget_typeandlocalvar_targetoftarget_infounion.voidlocalVarTargetTable(int startPc, int length, int index)Writes an element oftable[]oflocalvar_targetoftarget_infounion.voidnumAnnotations(int num)Writesnum_annotationsinRuntime(In)VisibleTypeAnnotations_attribute.voidoffsetTarget(int targetType, int offset)Writestarget_typeandoffset_targetoftarget_infounion.voidsupertypeTarget(int supertypeIndex)Writestarget_typeandsupertype_targetoftarget_infounion.voidthrowsTarget(int throwsTypeIndex)Writestarget_typeandthrows_targetoftarget_infounion.voidtypeArgumentTarget(int targetType, int offset, int type_argument_index)Writestarget_typeandtype_argument_targetoftarget_infounion.voidtypeParameterBoundTarget(int targetType, int typeParameterIndex, int boundIndex)Writestarget_typeandtype_parameter_bound_targetoftarget_infounion.voidtypeParameterTarget(int targetType, int typeParameterIndex)Writestarget_typeandtype_parameter_targetoftarget_infounion.voidtypePath(int pathLength)Writespath_lengthoftype_path.voidtypePathPath(int typePathKind, int typeArgumentIndex)Writes an element ofpath[]oftype_path.-
Methods inherited from class javassist.bytecode.annotation.AnnotationsWriter
annotation, annotation, annotationValue, arrayValue, classInfoIndex, classInfoIndex, close, constValueIndex, constValueIndex, constValueIndex, constValueIndex, constValueIndex, constValueIndex, constValueIndex, constValueIndex, constValueIndex, constValueIndex, enumConstValue, enumConstValue, getConstPool, memberValuePair, memberValuePair, numParameters
-
-
-
-
Constructor Detail
-
TypeAnnotationsWriter
public TypeAnnotationsWriter(OutputStream os, ConstPool cp)
Constructs with the given output stream.- Parameters:
os- the output stream.cp- the constant pool.
-
-
Method Detail
-
numAnnotations
public void numAnnotations(int num) throws IOExceptionWritesnum_annotationsinRuntime(In)VisibleTypeAnnotations_attribute. It must be followed bynuminstances oftype_annotation.- Overrides:
numAnnotationsin classAnnotationsWriter- Throws:
IOException
-
typeParameterTarget
public void typeParameterTarget(int targetType, int typeParameterIndex) throws IOExceptionWritestarget_typeandtype_parameter_targetoftarget_infounion.- Throws:
IOException
-
supertypeTarget
public void supertypeTarget(int supertypeIndex) throws IOExceptionWritestarget_typeandsupertype_targetoftarget_infounion.- Throws:
IOException
-
typeParameterBoundTarget
public void typeParameterBoundTarget(int targetType, int typeParameterIndex, int boundIndex) throws IOExceptionWritestarget_typeandtype_parameter_bound_targetoftarget_infounion.- Throws:
IOException
-
emptyTarget
public void emptyTarget(int targetType) throws IOExceptionWritestarget_typeandempty_targetoftarget_infounion.- Throws:
IOException
-
formalParameterTarget
public void formalParameterTarget(int formalParameterIndex) throws IOExceptionWritestarget_typeandtype_parameter_targetoftarget_infounion.- Throws:
IOException
-
throwsTarget
public void throwsTarget(int throwsTypeIndex) throws IOExceptionWritestarget_typeandthrows_targetoftarget_infounion.- Throws:
IOException
-
localVarTarget
public void localVarTarget(int targetType, int tableLength) throws IOExceptionWritestarget_typeandlocalvar_targetoftarget_infounion. It must be followed bytableLengthcalls tolocalVarTargetTable.- Throws:
IOException
-
localVarTargetTable
public void localVarTargetTable(int startPc, int length, int index) throws IOExceptionWrites an element oftable[]oflocalvar_targetoftarget_infounion.- Throws:
IOException
-
catchTarget
public void catchTarget(int exceptionTableIndex) throws IOExceptionWritestarget_typeandcatch_targetoftarget_infounion.- Throws:
IOException
-
offsetTarget
public void offsetTarget(int targetType, int offset) throws IOExceptionWritestarget_typeandoffset_targetoftarget_infounion.- Throws:
IOException
-
typeArgumentTarget
public void typeArgumentTarget(int targetType, int offset, int type_argument_index) throws IOExceptionWritestarget_typeandtype_argument_targetoftarget_infounion.- Throws:
IOException
-
typePath
public void typePath(int pathLength) throws IOExceptionWritespath_lengthoftype_path.- Throws:
IOException
-
typePathPath
public void typePathPath(int typePathKind, int typeArgumentIndex) throws IOExceptionWrites an element ofpath[]oftype_path.- Throws:
IOException
-
-