Class FieldGenOrMethodGen

    • Field Detail

      • name

        @Deprecated
        protected java.lang.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​(int accessFlags)
        Constructs a FieldGenOrMethodGen.
        Parameters:
        accessFlags - The access flags.
        Since:
        6.0
    • Method Detail

      • addAll

        protected void addAll​(Attribute[] attributes)
        Adds all attributes from an array.
        Parameters:
        attributes - The attributes to add.
      • 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.
      • clone

        public java.lang.Object clone()
        Overrides:
        clone in class java.lang.Object
      • getAttributes

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

        public abstract java.lang.String getSignature()
        Gets the signature of method or field.
        Returns:
        signature of method/field.
      • removeAttribute

        public void removeAttribute​(Attribute a)
        Removes an attribute.
        Parameters:
        a - The attribute to remove.
      • setName

        public void setName​(java.lang.String name)
        Description copied from interface: NamedAndTyped
        Sets the name.
        Specified by:
        setName in interface NamedAndTyped
        Parameters:
        name - The name.