Interface Annotatable

    • 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 to this 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