Class FieldGenOrMethodGen

    • Field Detail

      • name

        @Deprecated
        protected String name
        Deprecated.
        (since 6.0) will be made private; do not access directly, use getter/setter
      • type

        @Deprecated
        protected Type type
        Deprecated.
        (since 6.0) will be made private; do not access directly, use getter/setter
      • cp

        @Deprecated
        protected ConstantPoolGen cp
        Deprecated.
        (since 6.0) will be made private; do not access directly, use getter/setter
    • Constructor Detail

      • FieldGenOrMethodGen

        protected FieldGenOrMethodGen()
      • FieldGenOrMethodGen

        protected FieldGenOrMethodGen​(int access_flags)
        Since:
        6.0
    • Method Detail

      • addAttribute

        public void addAttribute​(Attribute a)
        Add an attribute to this method. Currently, the JVM knows about the `Code', `ConstantValue', `Synthetic' and `Exceptions' attributes. Other attributes will be ignored by the JVM but do no harm.
        Parameters:
        a - attribute to be added
      • addAnnotationEntry

        public void addAnnotationEntry​(AnnotationEntryGen ag)
        Since:
        6.0
      • removeAttribute

        public void removeAttribute​(Attribute a)
        Remove an attribute.
      • removeAnnotationEntry

        public void removeAnnotationEntry​(AnnotationEntryGen ag)
        Since:
        6.0
      • removeAttributes

        public void removeAttributes()
        Remove all attributes.
      • removeAnnotationEntries

        public void removeAnnotationEntries()
        Since:
        6.0
      • getAttributes

        public Attribute[] getAttributes()
        Returns:
        all attributes of this method.
      • getSignature

        public abstract String getSignature()
        Returns:
        signature of method/field.