Class ModifiableCreator


  • @ParametersAreNonnullByDefault
    @Generated({"Modifiables.generator","AttributeBuilderThirdPartyModel.Creator"})
    @NotThreadSafe
    final class ModifiableCreator
    extends AttributeBuilderThirdPartyModel.Creator
    A modifiable implementation of the Creator type.

    Use the create() static factory methods to create new instances.

    ModifiableCreator is not thread-safe

    • Field Detail

      • buildMethod

        @Nullable
        private javax.lang.model.element.ExecutableElement buildMethod
      • copyMethod

        @Nullable
        private javax.lang.model.element.ExecutableElement copyMethod
      • builderMethod

        @Nullable
        private javax.lang.model.element.ExecutableElement builderMethod
      • builderType

        @Nullable
        private javax.lang.model.element.TypeElement builderType
    • Constructor Detail

      • ModifiableCreator

        private ModifiableCreator()
    • Method Detail

      • create

        public static ModifiableCreator create()
        Construct a modifiable instance of Creator.
        Returns:
        A new modifiable instance
      • clear

        public ModifiableCreator clear()
        Clears the object by setting all attributes to their initial values.
        Returns:
        this for use in a chained invocation
      • from

        public ModifiableCreator from​(ModifiableCreator instance)
        Fill this modifiable instance with attribute values from the provided AttributeBuilderThirdPartyModel.Creator instance. Regular attribute values will be overridden, i.e. replaced with ones of an instance. Any of the instance's absent optional values will not be copied (will not override current values).
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this for use in a chained invocation
      • from

        private void from​(java.lang.Object object)
      • buildMethod

        public ModifiableCreator buildMethod​(@Nullable
                                             javax.lang.model.element.ExecutableElement buildMethod)
        Assigns a value to the buildMethod attribute.
        Specified by:
        buildMethod in class AttributeBuilderThirdPartyModel.Creator
        Parameters:
        buildMethod - The value for buildMethod, can be null
        Returns:
        this for use in a chained invocation
      • copyMethod

        public ModifiableCreator copyMethod​(@Nullable
                                            javax.lang.model.element.ExecutableElement copyMethod)
        Assigns a value to the copyMethod attribute.
        Specified by:
        copyMethod in class AttributeBuilderThirdPartyModel.Creator
        Parameters:
        copyMethod - The value for copyMethod, can be null
        Returns:
        this for use in a chained invocation
      • builderMethod

        public ModifiableCreator builderMethod​(@Nullable
                                               javax.lang.model.element.ExecutableElement builderMethod)
        Assigns a value to the builderMethod attribute.
        Specified by:
        builderMethod in class AttributeBuilderThirdPartyModel.Creator
        Parameters:
        builderMethod - The value for builderMethod, can be null
        Returns:
        this for use in a chained invocation
      • builderType

        public ModifiableCreator builderType​(@Nullable
                                             javax.lang.model.element.TypeElement builderType)
        Assigns a value to the builderType attribute.
        Specified by:
        builderType in class AttributeBuilderThirdPartyModel.Creator
        Parameters:
        builderType - The value for builderType, can be null
        Returns:
        this for use in a chained invocation
      • isInitialized

        public final boolean isInitialized()
        Returns true if all required attributes are set, indicating that the object is initialized.
        Returns:
        true if set
      • equals

        public boolean equals​(@Nullable
                              java.lang.Object another)
        This instance is equal to all instances of ModifiableCreator that have equal attribute values.
        Overrides:
        equals in class java.lang.Object
        Returns:
        true if this is equal to another instance
      • hashCode

        public int hashCode()
        Computes a hash code from attributes: buildMethod, copyMethod, builderMethod, builderType.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashCode value
      • toString

        public java.lang.String toString()
        Generates a string representation of this Creator. If uninitialized, some attribute values may appear as question marks.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A string representation