Class Datatype_Builder.Value
- java.lang.Object
-
- org.inferred.freebuilder.processor.Datatype
-
- org.inferred.freebuilder.processor.Datatype_Builder.Rebuildable
-
- org.inferred.freebuilder.processor.Datatype_Builder.Value
-
- Enclosing class:
- Datatype_Builder
private static final class Datatype_Builder.Value extends Datatype_Builder.Rebuildable
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.inferred.freebuilder.processor.Datatype
Datatype.Builder, Datatype.StandardMethod, Datatype.UnderrideLevel, Datatype.Visibility
-
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description privateValue(Datatype_Builder builder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)TypegetBuilder()Returns the builder type that users will see.java.util.Optional<BuilderFactory>getBuilderFactory()Returns the builder factory mechanism the user has exposed, if any.NameAndVisibilitygetBuildMethod()Returns the build method to be generated.NameAndVisibilitygetBuildPartialMethod()Returns the partial build method to be generated.NameAndVisibilitygetClearMethod()Returns the clear method to be generated.TypeClassgetGeneratedBuilder()Returns the builder class that should be generated.com.google.common.collect.ImmutableList<Excerpt>getGeneratedBuilderAnnotations()Returns a list of annotations that should be applied to the generated builder class.booleangetHasToBuilderMethod()Returns whether the value type has a toBuilder method that needs to be generated.NameAndVisibilitygetMergeFromBuilderMethod()Returns the mergeFrom(Builder) method to be generated.NameAndVisibilitygetMergeFromValueMethod()Returns the mergeFrom(Value) method to be generated.com.google.common.collect.ImmutableList<Excerpt>getNestedClasses()Returns a list of nested classes that should be added to the generated builder class.TypeClassgetPartialType()Returns the partial value class that should be generated.TypeClassgetPropertyEnum()Returns the Property enum that may be generated.java.util.Optional<TypeClass>getRebuildableType()Returns the Rebuildable interface that should be generated, if any.com.google.common.collect.ImmutableMap<Datatype.StandardMethod,Datatype.UnderrideLevel>getStandardMethodUnderrides()TypeClassgetType()Returns the type itself.TypeClassgetValueType()Returns the value class that should be generated.com.google.common.collect.ImmutableList<Excerpt>getValueTypeAnnotations()Returns a list of annotations that should be applied to the generated value class.Datatype.VisibilitygetValueTypeVisibility()Returns the visibility of the generated value class.inthashCode()booleanisBuilderSerializable()Returns whether the builder type should be serializable.booleanisExtensible()Whether there is a package-visible, no-args constructor so we can subclass the Builder.booleanisInterfaceType()Returns true if the type is an interface.Datatype.BuildertoBuilder()java.lang.StringtoString()-
Methods inherited from class org.inferred.freebuilder.processor.Datatype
standardMethodUnderride
-
-
-
-
Field Detail
-
type
private final TypeClass type
-
interfaceType
private final boolean interfaceType
-
builder
private final Type builder
-
extensible
private final boolean extensible
-
builderFactory
private final BuilderFactory builderFactory
-
generatedBuilder
private final TypeClass generatedBuilder
-
valueType
private final TypeClass valueType
-
partialType
private final TypeClass partialType
-
rebuildableType
private final TypeClass rebuildableType
-
propertyEnum
private final TypeClass propertyEnum
-
standardMethodUnderrides
private final com.google.common.collect.ImmutableMap<Datatype.StandardMethod,Datatype.UnderrideLevel> standardMethodUnderrides
-
builderSerializable
private final boolean builderSerializable
-
hasToBuilderMethod
private final boolean hasToBuilderMethod
-
buildMethod
private final NameAndVisibility buildMethod
-
buildPartialMethod
private final NameAndVisibility buildPartialMethod
-
clearMethod
private final NameAndVisibility clearMethod
-
mergeFromBuilderMethod
private final NameAndVisibility mergeFromBuilderMethod
-
mergeFromValueMethod
private final NameAndVisibility mergeFromValueMethod
-
generatedBuilderAnnotations
private final com.google.common.collect.ImmutableList<Excerpt> generatedBuilderAnnotations
-
valueTypeAnnotations
private final com.google.common.collect.ImmutableList<Excerpt> valueTypeAnnotations
-
valueTypeVisibility
private final Datatype.Visibility valueTypeVisibility
-
nestedClasses
private final com.google.common.collect.ImmutableList<Excerpt> nestedClasses
-
-
Constructor Detail
-
Value
private Value(Datatype_Builder builder)
-
-
Method Detail
-
isInterfaceType
public boolean isInterfaceType()
Description copied from class:DatatypeReturns true if the type is an interface.- Specified by:
isInterfaceTypein classDatatype
-
getBuilder
public Type getBuilder()
Description copied from class:DatatypeReturns the builder type that users will see.- Specified by:
getBuilderin classDatatype
-
isExtensible
public boolean isExtensible()
Description copied from class:DatatypeWhether there is a package-visible, no-args constructor so we can subclass the Builder.- Specified by:
isExtensiblein classDatatype
-
getBuilderFactory
public java.util.Optional<BuilderFactory> getBuilderFactory()
Description copied from class:DatatypeReturns the builder factory mechanism the user has exposed, if any.- Specified by:
getBuilderFactoryin classDatatype
-
getGeneratedBuilder
public TypeClass getGeneratedBuilder()
Description copied from class:DatatypeReturns the builder class that should be generated.- Specified by:
getGeneratedBuilderin classDatatype
-
getValueType
public TypeClass getValueType()
Description copied from class:DatatypeReturns the value class that should be generated.- Specified by:
getValueTypein classDatatype
-
getPartialType
public TypeClass getPartialType()
Description copied from class:DatatypeReturns the partial value class that should be generated.- Specified by:
getPartialTypein classDatatype
-
getRebuildableType
public java.util.Optional<TypeClass> getRebuildableType()
Description copied from class:DatatypeReturns the Rebuildable interface that should be generated, if any.- Specified by:
getRebuildableTypein classDatatype
-
getPropertyEnum
public TypeClass getPropertyEnum()
Description copied from class:DatatypeReturns the Property enum that may be generated.- Specified by:
getPropertyEnumin classDatatype
-
getStandardMethodUnderrides
public com.google.common.collect.ImmutableMap<Datatype.StandardMethod,Datatype.UnderrideLevel> getStandardMethodUnderrides()
- Specified by:
getStandardMethodUnderridesin classDatatype
-
isBuilderSerializable
public boolean isBuilderSerializable()
Description copied from class:DatatypeReturns whether the builder type should be serializable.- Specified by:
isBuilderSerializablein classDatatype
-
getHasToBuilderMethod
public boolean getHasToBuilderMethod()
Description copied from class:DatatypeReturns whether the value type has a toBuilder method that needs to be generated.- Specified by:
getHasToBuilderMethodin classDatatype
-
getBuildMethod
public NameAndVisibility getBuildMethod()
Description copied from class:DatatypeReturns the build method to be generated.- Specified by:
getBuildMethodin classDatatype
-
getBuildPartialMethod
public NameAndVisibility getBuildPartialMethod()
Description copied from class:DatatypeReturns the partial build method to be generated.- Specified by:
getBuildPartialMethodin classDatatype
-
getClearMethod
public NameAndVisibility getClearMethod()
Description copied from class:DatatypeReturns the clear method to be generated.- Specified by:
getClearMethodin classDatatype
-
getMergeFromBuilderMethod
public NameAndVisibility getMergeFromBuilderMethod()
Description copied from class:DatatypeReturns the mergeFrom(Builder) method to be generated.- Specified by:
getMergeFromBuilderMethodin classDatatype
-
getMergeFromValueMethod
public NameAndVisibility getMergeFromValueMethod()
Description copied from class:DatatypeReturns the mergeFrom(Value) method to be generated.- Specified by:
getMergeFromValueMethodin classDatatype
-
getGeneratedBuilderAnnotations
public com.google.common.collect.ImmutableList<Excerpt> getGeneratedBuilderAnnotations()
Description copied from class:DatatypeReturns a list of annotations that should be applied to the generated builder class.- Specified by:
getGeneratedBuilderAnnotationsin classDatatype
-
getValueTypeAnnotations
public com.google.common.collect.ImmutableList<Excerpt> getValueTypeAnnotations()
Description copied from class:DatatypeReturns a list of annotations that should be applied to the generated value class.- Specified by:
getValueTypeAnnotationsin classDatatype
-
getValueTypeVisibility
public Datatype.Visibility getValueTypeVisibility()
Description copied from class:DatatypeReturns the visibility of the generated value class.- Specified by:
getValueTypeVisibilityin classDatatype
-
getNestedClasses
public com.google.common.collect.ImmutableList<Excerpt> getNestedClasses()
Description copied from class:DatatypeReturns a list of nested classes that should be added to the generated builder class.- Specified by:
getNestedClassesin classDatatype
-
toBuilder
public Datatype.Builder toBuilder()
- Specified by:
toBuilderin classDatatype_Builder.Rebuildable
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-