- All Superinterfaces:
Attribute<ConstantValueAttribute>,ClassfileElement,FieldElement,WritableElement<ConstantValueAttribute>
- All Known Implementing Classes:
BoundAttribute.BoundConstantValueAttribute,UnboundAttribute.UnboundConstantValueAttribute
public sealed interface ConstantValueAttribute
extends Attribute<ConstantValueAttribute>, FieldElement
permits 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 Summary
Modifier and TypeMethodDescriptionconstant()Returns the constant value of the field.static ConstantValueAttributeof(ConstantDesc value) Returns aConstantValueattribute.static ConstantValueAttributeof(ConstantValueEntry value) Returns aConstantValueattribute.Methods inherited from interface org.glavo.classfile.Attribute
attributeMapper, attributeNameMethods inherited from interface org.glavo.classfile.WritableElement
writeTo
-
Method Details
-
constant
ConstantValueEntry constant()Returns the constant value of the field.- Returns:
- the constant value of the field
-
of
Returns aConstantValueattribute.- Parameters:
value- the constant value- Returns:
- a
ConstantValueattribute
-
of
Returns aConstantValueattribute.- Parameters:
value- the constant value- Returns:
- a
ConstantValueattribute
-