Package javassist.bytecode.annotation
Class TypeAnnotationsWriter
java.lang.Object
javassist.bytecode.annotation.AnnotationsWriter
javassist.bytecode.annotation.TypeAnnotationsWriter
A convenience class for constructing a
..TypeAnnotations_attribute.
See the source code of the TypeAnnotationsAttribute class.- Since:
- 3.19
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs with the given output stream. -
Method Summary
Modifier and TypeMethodDescriptionvoidcatchTarget(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 Details
-
TypeAnnotationsWriter
Constructs with the given output stream.- Parameters:
os- the output stream.cp- the constant pool.
-
-
Method Details
-
numAnnotations
Writesnum_annotationsinRuntime(In)VisibleTypeAnnotations_attribute. It must be followed bynuminstances oftype_annotation.- Overrides:
numAnnotationsin classAnnotationsWriter- Throws:
IOException
-
typeParameterTarget
Writestarget_typeandtype_parameter_targetoftarget_infounion.- Throws:
IOException
-
supertypeTarget
Writestarget_typeandsupertype_targetoftarget_infounion.- Throws:
IOException
-
typeParameterBoundTarget
public void typeParameterBoundTarget(int targetType, int typeParameterIndex, int boundIndex) throws IOException Writestarget_typeandtype_parameter_bound_targetoftarget_infounion.- Throws:
IOException
-
emptyTarget
Writestarget_typeandempty_targetoftarget_infounion.- Throws:
IOException
-
formalParameterTarget
Writestarget_typeandtype_parameter_targetoftarget_infounion.- Throws:
IOException
-
throwsTarget
Writestarget_typeandthrows_targetoftarget_infounion.- Throws:
IOException
-
localVarTarget
Writestarget_typeandlocalvar_targetoftarget_infounion. It must be followed bytableLengthcalls tolocalVarTargetTable.- Throws:
IOException
-
localVarTargetTable
Writes an element oftable[]oflocalvar_targetoftarget_infounion.- Throws:
IOException
-
catchTarget
Writestarget_typeandcatch_targetoftarget_infounion.- Throws:
IOException
-
offsetTarget
Writestarget_typeandoffset_targetoftarget_infounion.- Throws:
IOException
-
typeArgumentTarget
public void typeArgumentTarget(int targetType, int offset, int type_argument_index) throws IOException Writestarget_typeandtype_argument_targetoftarget_infounion.- Throws:
IOException
-
typePath
Writespath_lengthoftype_path.- Throws:
IOException
-
typePathPath
Writes an element ofpath[]oftype_path.- Throws:
IOException
-