Package org.codehaus.janino.util
Interface Annotatable
-
- All Known Implementing Classes:
ClassFile
,ClassFile.FieldInfo
,ClassFile.MethodInfo
public interface Annotatable
An object in a Java class file which can have annotations (classes, methods and fields).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addAnnotationsAttributeEntry(boolean runtimeVisible, java.lang.String fieldDescriptor, java.util.Map<java.lang.Short,ClassFile.ElementValue> elementValuePairs)
Adds a "Runtime[In]visibleAnnotations" attribute tothis
object (if that annotation does not yet exist) and adds an entry to it.ClassFile.Annotation[]
getAnnotations(boolean runtimeVisible)
-
-
-
Method Detail
-
getAnnotations
ClassFile.Annotation[] getAnnotations(boolean runtimeVisible)
- Returns:
- The annotations on this element; an empty array iff there are no annotations
-
addAnnotationsAttributeEntry
void addAnnotationsAttributeEntry(boolean runtimeVisible, java.lang.String fieldDescriptor, java.util.Map<java.lang.Short,ClassFile.ElementValue> elementValuePairs)
Adds a "Runtime[In]visibleAnnotations" attribute tothis
object (if that annotation does not yet exist) and adds an entry to it.- Parameters:
elementValuePairs
- Maps "elemant_name_index" (ClassFile.ConstantUtf8Info
) to "element_value", see JVMS8 4.7.16
-
-