Interface ConstantValueAttribute

All Superinterfaces:
Attribute<ConstantValueAttribute>, ClassfileElement, FieldElement, WritableElement<ConstantValueAttribute>
All Known Implementing Classes:
BoundAttribute.BoundConstantValueAttribute, UnboundAttribute.UnboundConstantValueAttribute

Models the ConstantValue attribute , which can appear on fields and indicates that the field's value is a constant. Delivered as a FieldElement when traversing the elements of a FieldModel.
  • Method Details

    • constant

      ConstantValueEntry constant()
      Returns the constant value of the field.
      Returns:
      the constant value of the field
    • of

      Returns a ConstantValue attribute.
      Parameters:
      value - the constant value
      Returns:
      a ConstantValue attribute
    • of

      Returns a ConstantValue attribute.
      Parameters:
      value - the constant value
      Returns:
      a ConstantValue attribute