Class Datatype

  • Direct Known Subclasses:
    Datatype_Builder.Rebuildable

    public abstract class Datatype
    extends java.lang.Object
    Metadata about a user's datatype.
    • Constructor Detail

      • Datatype

        public Datatype()
    • Method Detail

      • getType

        public abstract TypeClass getType()
        Returns the type itself.
      • isInterfaceType

        public abstract boolean isInterfaceType()
        Returns true if the type is an interface.
      • getBuilder

        public abstract Type 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

        public abstract java.util.Optional<BuilderFactory> getBuilderFactory()
        Returns the builder factory mechanism the user has exposed, if any.
      • getGeneratedBuilder

        public abstract TypeClass getGeneratedBuilder()
        Returns the builder class that should be generated.
      • getValueType

        public abstract TypeClass getValueType()
        Returns the value class that should be generated.
      • getPartialType

        public abstract TypeClass getPartialType()
        Returns the partial value class that should be generated.
      • getRebuildableType

        public abstract java.util.Optional<TypeClass> getRebuildableType()
        Returns the Rebuildable interface that should be generated, if any.
      • getPropertyEnum

        public abstract TypeClass getPropertyEnum()
        Returns the Property enum that may be generated.
      • 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

        public abstract NameAndVisibility getBuildMethod()
        Returns the build method to be generated.
      • getBuildPartialMethod

        public abstract NameAndVisibility getBuildPartialMethod()
        Returns the partial build method to be generated.
      • getClearMethod

        public abstract NameAndVisibility getClearMethod()
        Returns the clear method to be generated.
      • getMergeFromBuilderMethod

        public abstract NameAndVisibility getMergeFromBuilderMethod()
        Returns the mergeFrom(Builder) method to be generated.
      • getMergeFromValueMethod

        public abstract NameAndVisibility getMergeFromValueMethod()
        Returns the mergeFrom(Value) method to be generated.
      • getGeneratedBuilderAnnotations

        public abstract com.google.common.collect.ImmutableList<Excerpt> getGeneratedBuilderAnnotations()
        Returns a list of annotations that should be applied to the generated builder class.
      • getValueTypeAnnotations

        public abstract com.google.common.collect.ImmutableList<Excerpt> getValueTypeAnnotations()
        Returns a list of annotations that should be applied to the generated value class.
      • getValueTypeVisibility

        public abstract Datatype.Visibility getValueTypeVisibility()
        Returns the visibility of the generated value class.
      • getNestedClasses

        public abstract com.google.common.collect.ImmutableList<Excerpt> getNestedClasses()
        Returns a list of nested classes that should be added to the generated builder class.