Class Datatype
java.lang.Object
org.inferred.freebuilder.processor.Datatype
- Direct Known Subclasses:
Datatype_Builder.Rebuildable
Metadata about a user's datatype.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder forDatatype.static enumStandard Java methods that may be underridden.static enumHow compulsory the underride is.static enum -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract TypeReturns the builder type that users will see.abstract Optional<BuilderFactory> Returns the builder factory mechanism the user has exposed, if any.abstract NameAndVisibilityReturns the build method to be generated.abstract NameAndVisibilityReturns the partial build method to be generated.abstract NameAndVisibilityReturns the clear method to be generated.abstract TypeClassReturns the builder class that should be generated.abstract com.google.common.collect.ImmutableList<Excerpt> Returns a list of annotations that should be applied to the generated builder class.abstract booleanReturns whether the value type has a toBuilder method that needs to be generated.abstract NameAndVisibilityReturns the mergeFrom(Builder) method to be generated.abstract NameAndVisibilityReturns the mergeFrom(Value) method to be generated.abstract com.google.common.collect.ImmutableList<Excerpt> Returns a list of nested classes that should be added to the generated builder class.abstract TypeClassReturns the partial value class that should be generated.abstract TypeClassReturns the Property enum that may be generated.Returns the Rebuildable interface that should be generated, if any.abstract com.google.common.collect.ImmutableMap<Datatype.StandardMethod, Datatype.UnderrideLevel> abstract TypeClassgetType()Returns the type itself.abstract TypeClassReturns the value class that should be generated.abstract com.google.common.collect.ImmutableList<Excerpt> Returns a list of annotations that should be applied to the generated value class.abstract Datatype.VisibilityReturns the visibility of the generated value class.abstract booleanReturns whether the builder type should be serializable.abstract booleanWhether there is a package-visible, no-args constructor so we can subclass the Builder.abstract booleanReturns true if the type is an interface.standardMethodUnderride(Datatype.StandardMethod standardMethod)
-
Constructor Details
-
Datatype
public Datatype()
-
-
Method Details
-
getType
Returns the type itself. -
isInterfaceType
public abstract boolean isInterfaceType()Returns true if the type is an interface. -
getBuilder
Returns the builder type that users will see. -
isExtensible
public abstract boolean isExtensible()Whether there is a package-visible, no-args constructor so we can subclass the Builder. -
getBuilderFactory
Returns the builder factory mechanism the user has exposed, if any. -
getGeneratedBuilder
Returns the builder class that should be generated. -
getValueType
Returns the value class that should be generated. -
getPartialType
Returns the partial value class that should be generated. -
getRebuildableType
-
getPropertyEnum
Returns the Property enum that may be generated. -
standardMethodUnderride
-
getStandardMethodUnderrides
public abstract com.google.common.collect.ImmutableMap<Datatype.StandardMethod, Datatype.UnderrideLevel> getStandardMethodUnderrides() -
isBuilderSerializable
public abstract boolean isBuilderSerializable()Returns whether the builder type should be serializable. -
getHasToBuilderMethod
public abstract boolean getHasToBuilderMethod()Returns whether the value type has a toBuilder method that needs to be generated. -
getBuildMethod
Returns the build method to be generated. -
getBuildPartialMethod
Returns the partial build method to be generated. -
getClearMethod
Returns the clear method to be generated. -
getMergeFromBuilderMethod
Returns the mergeFrom(Builder) method to be generated. -
getMergeFromValueMethod
Returns the mergeFrom(Value) method to be generated. -
getGeneratedBuilderAnnotations
Returns a list of annotations that should be applied to the generated builder class. -
getValueTypeAnnotations
Returns a list of annotations that should be applied to the generated value class. -
getValueTypeVisibility
Returns the visibility of the generated value class. -
getNestedClasses
Returns a list of nested classes that should be added to the generated builder class. -
toBuilder
-