Class BaseWriter
java.lang.Object
mockit.asm.BaseWriter
- Direct Known Subclasses:
ClassVisitor, FieldVisitor, MethodVisitor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AnnotationVisitorThe runtime visible annotations of this class/field/method.protected intThe access flags of this class, field, or method.protected ConstantPoolGenerationThe dynamically generated constant pool of the class being built/modified. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedBaseWriter(ConstantPoolGeneration cp, int classOrMemberAccess) -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidcreateMarkerAttributes(int classVersion) protected final @NonNegative intfinal ConstantPoolGenerationReturns theconstant pool generation helper objectused by this writer.protected final @NonNegative intprotected final @NonNegative intprotected voidput(ByteVector out) protected static voidput(ByteVector out, List<? extends BaseWriter> writers) protected final voidputAccess(ByteVector out, int baseMask) protected final voidputAnnotations(ByteVector out) protected final voidvisitAnnotation(String desc) Visits an annotation of the class/field/method being visited.voidvisitEnd()Visits the end of the class/field/method being visited.
-
Field Details
-
cp
The dynamically generated constant pool of the class being built/modified. -
classOrMemberAccess
protected int classOrMemberAccessThe access flags of this class, field, or method. -
annotations
The runtime visible annotations of this class/field/method.
-
-
Constructor Details
-
BaseWriter
protected BaseWriter() -
BaseWriter
-
-
Method Details
-
getConstantPoolGeneration
Returns theconstant pool generation helper objectused by this writer.- Returns:
- the constant pool generation
-
visitAnnotation
Visits an annotation of the class/field/method being visited.- Parameters:
desc- the descriptor of the annotation type- Returns:
- a visitor to visit the annotation values, or
nullif this visitor is not interested in visiting the annotation
-
visitEnd
public void visitEnd()Visits the end of the class/field/method being visited. This method, which is the last one to be called, is used to inform the visitor that all the annotations and attributes of the class/field/method have been visited. -
createMarkerAttributes
protected final void createMarkerAttributes(int classVersion) -
getAnnotationsSize
protected final @NonNegative int getAnnotationsSize() -
getMarkerAttributeCount
protected final @NonNegative int getMarkerAttributeCount() -
getMarkerAttributesSize
protected final @NonNegative int getMarkerAttributesSize() -
putAccess
-
putMarkerAttributes
-
putAnnotations
-
put
-
put
-