Top Description Methods
org.codehaus.janino.util

public Interface Annotatable

Known Direct Implementers
org.codehaus.janino.util.ClassFile, org.codehaus.janino.util.ClassFile.MethodInfo, org.codehaus.janino.util.ClassFile.FieldInfo
Imports
java.util.Map

An object in a Java class file which can have annotations (classes, methods and fields).

Method Summary

Modifier and TypeMethod and Description
public void
addAnnotationsAttributeEntry(boolean runtimeVisible, String fieldDescriptor, Map<Short, ClassFile.ElementValue>
Maps "elemant_name_index" (ClassFile.ConstantUtf8Info) to "element_value", see JVMS8 4.7.16
elementValuePairs
)

Adds a "Runtime[In]visibleAnnotations" attribute to this object (if that annotation does not yet exist) and adds an entry to it.

public ClassFile.Annotation[]

Returns:

The annotations on this element; an empty array iff there are no annotations
getAnnotations
(boolean runtimeVisible)

Method Detail

addAnnotationsAttributeEntryback to summary
public void addAnnotationsAttributeEntry(boolean runtimeVisible, String fieldDescriptor, Map<Short, ClassFile.ElementValue> elementValuePairs)

Adds a "Runtime[In]visibleAnnotations" attribute to this object (if that annotation does not yet exist) and adds an entry to it.

Parameters
elementValuePairs:Map<Short, ClassFile.ElementValue>

Maps "elemant_name_index" (ClassFile.ConstantUtf8Info) to "element_value", see JVMS8 4.7.16

getAnnotationsback to summary
public ClassFile.Annotation[] getAnnotations(boolean runtimeVisible)
Returns:ClassFile.Annotation[]

The annotations on this element; an empty array iff there are no annotations