Class FieldBuilder


  • public class FieldBuilder
    extends Object
    Fluent builder for a single field of a class under construction, returning to its ClassBuilder from end().
    • Method Detail

      • constantValue

        public FieldBuilder constantValue​(Object value)
        Gives the field a ConstantValue attribute.
        Parameters:
        value - an Integer, Long, Float, Double or String constant
        Returns:
        this builder
      • synthetic

        public FieldBuilder synthetic()
        Adds ACC_SYNTHETIC to the field's access flags.
        Returns:
        this builder
      • deprecated

        public FieldBuilder deprecated()
        Marks the field for a Deprecated attribute.
        Returns:
        this builder
      • end

        public ClassBuilder end()
        Returns:
        the class builder this field belongs to