Class RuntimeVisibleParameterAnnotationsAttribute


  • public class RuntimeVisibleParameterAnnotationsAttribute
    extends Attribute
    The RuntimeVisibleParameterAnnotations or RuntimeInvisibleParameterAnnotations attribute.
    • Constructor Detail

      • RuntimeVisibleParameterAnnotationsAttribute

        public RuntimeVisibleParameterAnnotationsAttribute​(String name,
                                                           MemberEntry parent,
                                                           boolean visible,
                                                           int nameIndex,
                                                           int length)
        Creates the attribute shell for parsing, attached to a member.
        Parameters:
        name - the attribute name
        parent - the member the attribute belongs to
        visible - true for the RuntimeVisible variant, false for RuntimeInvisible
        nameIndex - constant-pool index of the name Utf8
        length - the attribute length in bytes
      • RuntimeVisibleParameterAnnotationsAttribute

        public RuntimeVisibleParameterAnnotationsAttribute​(String name,
                                                           ClassFile parent,
                                                           boolean visible,
                                                           int nameIndex,
                                                           int length)
        Creates the attribute shell for parsing, attached to a class.
        Parameters:
        name - the attribute name
        parent - the class the attribute belongs to
        visible - true for the RuntimeVisible variant, false for RuntimeInvisible
        nameIndex - constant-pool index of the name Utf8
        length - the attribute length in bytes
    • Method Detail

      • getParameterAnnotations

        public List<List<Annotation>> getParameterAnnotations()
        Returns:
        the parameter annotations
      • setParameterAnnotations

        public void setParameterAnnotations​(List<List<Annotation>> parameterAnnotations)
        Parameters:
        parameterAnnotations - the per-parameter annotation lists
      • isVisible

        public boolean isVisible()
        Returns:
        whether visible
      • read

        public void read​(ClassFile classFile,
                         int length)
        Description copied from class: Attribute
        Reads the attribute data from the class file.
        Specified by:
        read in class Attribute
        Parameters:
        classFile - The ClassFile utility to read data.
        length - The length of the attribute.
      • updateLength

        public void updateLength()
        Description copied from class: Attribute
        Recomputes the attribute length field from the current in-memory content.
        Specified by:
        updateLength in class Attribute