Package xyz.cofe.trambda
Class AnnotationDump
- java.lang.Object
-
- org.objectweb.asm.AnnotationVisitor
-
- xyz.cofe.trambda.AnnotationDump
-
public class AnnotationDump extends org.objectweb.asm.AnnotationVisitorСоздание дампа байт-кода аннотаций
-
-
Field Summary
Fields Modifier and Type Field Description static AtomicIntegeridSeq
-
Constructor Summary
Constructors Constructor Description AnnotationDump(int api)Constructs a newAnnotationVisitor.AnnotationDump(int api, org.objectweb.asm.AnnotationVisitor annotationVisitor)Constructs a newAnnotationVisitor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AnnotationDumpbyteCode(Consumer<? super ByteCode> bc)Указывает функцию принимающую байт кодAnnotationDumpbyteCode(Consumer<? super ByteCode> bc, GetAnnotationByteCodes sencondConsumer)protected voidemit(ByteCode bc)voidvisit(String name, Object value)Visits a primitive value of the annotation.org.objectweb.asm.AnnotationVisitorvisitAnnotation(String name, String descriptor)Visits a nested annotation value of the annotation.org.objectweb.asm.AnnotationVisitorvisitArray(String name)Visits an array value of the annotation.voidvisitEnd()Visits the end of the annotation.voidvisitEnum(String name, String descriptor, String value)Visits an enumeration value of the annotation.
-
-
-
Field Detail
-
idSeq
public static final AtomicInteger idSeq
-
-
Constructor Detail
-
AnnotationDump
public AnnotationDump(int api)
Constructs a newAnnotationVisitor.- Parameters:
api- the ASM API version implemented by this visitor. Must be one ofOpcodes.ASM4,Opcodes.ASM5,Opcodes.ASM6orOpcodes.ASM7.
-
AnnotationDump
public AnnotationDump(int api, org.objectweb.asm.AnnotationVisitor annotationVisitor)Constructs a newAnnotationVisitor.- Parameters:
api- the ASM API version implemented by this visitor. Must be one ofOpcodes.ASM4,Opcodes.ASM5,Opcodes.ASM6orOpcodes.ASM7.annotationVisitor- the annotation visitor to which this visitor must delegate method calls. May be null.
-
-
Method Detail
-
byteCode
public AnnotationDump byteCode(Consumer<? super ByteCode> bc)
Указывает функцию принимающую байт код- Parameters:
bc- функция приема байт кода- Returns:
- SELF ссылка
-
byteCode
public AnnotationDump byteCode(Consumer<? super ByteCode> bc, GetAnnotationByteCodes sencondConsumer)
-
emit
protected void emit(ByteCode bc)
-
visit
public void visit(String name, Object value)
Visits a primitive value of the annotation.- Overrides:
visitin classorg.objectweb.asm.AnnotationVisitor- Parameters:
name- the value name.value- the actual value, whose type must beByte,Boolean,Character,Short,Integer,Long,Float,Double,StringorTypeofType.OBJECTorType.ARRAYsort. This value can also be an array of byte, boolean, short, char, int, long, float or double values (this is equivalent to usingvisitArray(java.lang.String)and visiting each array element in turn,
-
visitEnum
public void visitEnum(String name, String descriptor, String value)
Visits an enumeration value of the annotation.- Overrides:
visitEnumin classorg.objectweb.asm.AnnotationVisitor- Parameters:
name- the value name.descriptor- the class descriptor of the enumeration class.value- the actual enumeration value.
-
visitAnnotation
public org.objectweb.asm.AnnotationVisitor visitAnnotation(String name, String descriptor)
Visits a nested annotation value of the annotation.- Overrides:
visitAnnotationin classorg.objectweb.asm.AnnotationVisitor- Parameters:
name- the value name.descriptor- the class descriptor of the nested annotation class.- Returns:
- a visitor to visit the actual nested annotation value, or null if this visitor is not interested in visiting this nested annotation. The nested annotation value must be fully visited before calling other methods on this annotation visitor.
-
visitArray
public org.objectweb.asm.AnnotationVisitor visitArray(String name)
Visits an array value of the annotation. Note that arrays of primitive values (such as byte, boolean, short, char, int, long, float or double) can be passed as value tovisit. This is whatClassReaderdoes for non empty arrays of primitive values.- Overrides:
visitArrayin classorg.objectweb.asm.AnnotationVisitor- Parameters:
name- the value name.- Returns:
- a visitor to visit the actual array value elements, or null if this visitor is not interested in visiting these values. The 'name' parameters passed to the methods of this visitor are ignored. All the array values must be visited before calling other methods on this annotation visitor.
-
visitEnd
public void visitEnd()
Visits the end of the annotation.- Overrides:
visitEndin classorg.objectweb.asm.AnnotationVisitor
-
-