Package serp.bytecode

Class BCField

    • Method Detail

      • isVolatile

        public boolean isVolatile()
        Manipulate the field access flags.
      • setVolatile

        public void setVolatile​(boolean on)
        Manipulate the field access flags.
      • isTransient

        public boolean isTransient()
        Manipulate the field access flags.
      • setTransient

        public void setTransient​(boolean on)
        Manipulate the field access flags.
      • isEnum

        public boolean isEnum()
        Manipulate the field access flags. Defaults to true for fields added to enum classes.
      • setEnum

        public void setEnum​(boolean on)
        Manipulate the field access flags. Defaults to true for fields added to enum classes.
      • getTypeName

        public java.lang.String getTypeName()
        Return the name of the type of this field. The name will be given in a form suitable for a Class.forName(java.lang.String) call.
        See Also:
        BCMember.getDescriptor()
      • getType

        public java.lang.Class getType()
        Return the Class object for the type of this field.
      • getTypeBC

        public BCClass getTypeBC()
        Return the bytecode for the type of this field.
      • getConstantValue

        public ConstantValue getConstantValue​(boolean add)
        Return the constant value information for the field. Acts internally through the Attributes interface.
        Parameters:
        add - if true, a new constant value attribute will be added if not already present
        Returns:
        the constant value information, or null if none and the add param is set to false
      • removeConstantValue

        public boolean removeConstantValue()
        Remove the constant value attribute for the field. Acts internally through the Attributes interface.
        Returns:
        true if there was a value to remove
      • acceptVisit

        public void acceptVisit​(BCVisitor visit)
        Description copied from interface: VisitAcceptor
        Accept a visit from a BCVisitor, calling the appropriate methods to notify the visitor that it has entered this entity, and to provide it with the proper callbacks for each sub-entity owned by this one.
        Specified by:
        acceptVisit in interface VisitAcceptor