Class FieldNodeBuilder


  • public final class FieldNodeBuilder
    extends Object
    Helps to build and instance of type FieldNode
    Since:
    0.4.3
    • Method Detail

      • field

        public static FieldNodeBuilder field​(String name)
        Creates a builder with the field's name
        Parameters:
        name - the name of the field to create
        Returns:
        an instance of FieldNodeBuilder
        Since:
        0.4.3
      • modifiers

        public FieldNodeBuilder modifiers​(int modifiers)
        The access modifiers for the field to create
        Parameters:
        modifiers - field modifiers
        Returns:
        the current builder instance
        Since:
        0.4.3
      • type

        public FieldNodeBuilder type​(ClassNode type)
        Sets the type of the FieldNode
        Parameters:
        type - the type of the field to create
        Returns:
        the current builder instance
        Since:
        0.4.3
      • type

        public FieldNodeBuilder type​(Class<?> type)
        Sets the type of the FieldNode
        Parameters:
        type - the type of field to create
        Returns:
        the current builder instance
        Since:
        0.4.3
      • owner

        public FieldNodeBuilder owner​(ClassNode owner)
        Sets the type of the instance containing the field
        Parameters:
        owner - the node containing the field
        Returns:
        the current builder instance
        Since:
        0.4.3
      • expression

        public FieldNodeBuilder expression​(Expression initialExpression)
        Sets the initial expression of the FieldNode
        Parameters:
        initialExpresion - expression to initialize the field
        Returns:
        the current builder instance
        Since:
        0.4.3
      • build

        public FieldNode build()
        Once the instance configuration has been finished, this method will return the configured instance.
        Returns:
        the configured FieldNode
        Since:
        0.4.3