Class BytecodeAnnotation
- java.lang.Object
-
- org.eolang.jeo.representation.bytecode.BytecodeAnnotation
-
- All Implemented Interfaces:
BytecodeAnnotationValue
public final class BytecodeAnnotation extends Object implements BytecodeAnnotationValue
Bytecode annotation.- Since:
- 0.2
-
-
Constructor Summary
Constructors Constructor Description BytecodeAnnotation(String descriptor, boolean visible)
Constructor.BytecodeAnnotation(String descriptor, boolean visible, List<BytecodeAnnotationValue> vals)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Iterable<org.xembly.Directive>
directives()
BytecodeAnnotation
write(int index, org.objectweb.asm.MethodVisitor visitor)
Write parameter annotation.BytecodeAnnotation
write(org.objectweb.asm.ClassVisitor visitor)
Write class annotation.BytecodeAnnotation
write(org.objectweb.asm.FieldVisitor visitor)
Write field annotation.BytecodeAnnotation
write(org.objectweb.asm.MethodVisitor visitor)
Write method annotation.void
writeTo(org.objectweb.asm.AnnotationVisitor visitor)
Write the value to the given visitor.
-
-
-
Constructor Detail
-
BytecodeAnnotation
public BytecodeAnnotation(String descriptor, boolean visible)
Constructor.- Parameters:
descriptor
- Descriptor.visible
- Visible.
-
BytecodeAnnotation
public BytecodeAnnotation(String descriptor, boolean visible, List<BytecodeAnnotationValue> vals)
Constructor.- Parameters:
descriptor
- Descriptor.visible
- Visible.vals
- Properties.
-
-
Method Detail
-
write
public BytecodeAnnotation write(org.objectweb.asm.ClassVisitor visitor)
Write class annotation.- Parameters:
visitor
- Visitor.- Returns:
- This.
-
write
public BytecodeAnnotation write(org.objectweb.asm.MethodVisitor visitor)
Write method annotation.- Parameters:
visitor
- Visitor.- Returns:
- This.
-
write
public BytecodeAnnotation write(int index, org.objectweb.asm.MethodVisitor visitor)
Write parameter annotation.- Parameters:
index
- Index of a parameter.visitor
- Method visitor.- Returns:
- This.
-
write
public BytecodeAnnotation write(org.objectweb.asm.FieldVisitor visitor)
Write field annotation.- Parameters:
visitor
- Visitor.- Returns:
- This.
-
writeTo
public void writeTo(org.objectweb.asm.AnnotationVisitor visitor)
Description copied from interface:BytecodeAnnotationValue
Write the value to the given visitor.- Specified by:
writeTo
in interfaceBytecodeAnnotationValue
- Parameters:
visitor
- Visitor.
-
directives
public Iterable<org.xembly.Directive> directives()
- Specified by:
directives
in interfaceBytecodeAnnotationValue
-
-