public abstract class Metadata
extends java.lang.Object
FreeBuilder type.| Modifier and Type | Class and Description |
|---|---|
static class |
Metadata.Builder
Builder for
Metadata. |
static class |
Metadata.Property
Metadata about a property of a
Metadata. |
static class |
Metadata.StandardMethod
Standard Java methods that may be underridden.
|
static class |
Metadata.UnderrideLevel
How compulsory the underride is.
|
static class |
Metadata.Visibility |
| Modifier and Type | Field and Description |
|---|---|
static com.google.common.base.Function<Metadata.Property,PropertyCodeGenerator> |
GET_CODE_GENERATOR |
| Constructor and Description |
|---|
Metadata() |
| Modifier and Type | Method and Description |
|---|---|
ParameterizedType |
getBuilder()
Returns the builder type that users will see.
|
abstract com.google.common.base.Optional<BuilderFactory> |
getBuilderFactory()
Returns the builder factory mechanism the user has exposed, if any.
|
abstract ParameterizedType |
getGeneratedBuilder()
Returns the builder class that should be generated.
|
abstract com.google.common.collect.ImmutableList<Excerpt> |
getGeneratedBuilderAnnotations()
Returns a list of annotations that should be applied to the generated builder class.
|
abstract com.google.common.collect.ImmutableList<com.google.common.base.Function<Metadata,Excerpt>> |
getNestedClasses()
Returns a list of nested classes that should be added to the generated builder class.
|
abstract ParameterizedType |
getPartialType()
Returns the partial value class that should be generated.
|
abstract com.google.common.collect.ImmutableList<Metadata.Property> |
getProperties()
Returns metadata about the properties of the type.
|
abstract ParameterizedType |
getPropertyEnum()
Returns the Property enum that may be generated.
|
abstract com.google.common.collect.ImmutableMap<Metadata.StandardMethod,Metadata.UnderrideLevel> |
getStandardMethodUnderrides() |
abstract ParameterizedType |
getType()
Returns the type itself.
|
abstract ParameterizedType |
getValueType()
Returns the value class that should be generated.
|
abstract com.google.common.collect.ImmutableList<Excerpt> |
getValueTypeAnnotations()
Returns a list of annotations that should be applied to the generated value class.
|
abstract Metadata.Visibility |
getValueTypeVisibility()
Returns the visibility of the generated value class.
|
abstract com.google.common.collect.ImmutableSet<QualifiedName> |
getVisibleNestedTypes()
Returns a set of nested types that will be visible in the generated class, either because they
will be generated, or because they are present in a superclass.
|
boolean |
hasBuilder()
Returns true if there is a user-visible Builder subclass defined.
|
abstract boolean |
isBuilderSerializable()
Returns whether the builder type should be serializable.
|
abstract boolean |
isInterfaceType()
Returns true if the type is an interface.
|
Metadata.UnderrideLevel |
standardMethodUnderride(Metadata.StandardMethod standardMethod) |
Metadata.Builder |
toBuilder() |
public static final com.google.common.base.Function<Metadata.Property,PropertyCodeGenerator> GET_CODE_GENERATOR
public abstract ParameterizedType getType()
public abstract boolean isInterfaceType()
public boolean hasBuilder()
public ParameterizedType getBuilder()
java.lang.IllegalStateException - if hasBuilder() returns false.public abstract com.google.common.base.Optional<BuilderFactory> getBuilderFactory()
public abstract ParameterizedType getGeneratedBuilder()
public abstract ParameterizedType getValueType()
public abstract ParameterizedType getPartialType()
public abstract com.google.common.collect.ImmutableSet<QualifiedName> getVisibleNestedTypes()
public abstract ParameterizedType getPropertyEnum()
public abstract com.google.common.collect.ImmutableList<Metadata.Property> getProperties()
public Metadata.UnderrideLevel standardMethodUnderride(Metadata.StandardMethod standardMethod)
public abstract com.google.common.collect.ImmutableMap<Metadata.StandardMethod,Metadata.UnderrideLevel> getStandardMethodUnderrides()
public abstract boolean isBuilderSerializable()
public abstract com.google.common.collect.ImmutableList<Excerpt> getGeneratedBuilderAnnotations()
public abstract com.google.common.collect.ImmutableList<Excerpt> getValueTypeAnnotations()
public abstract Metadata.Visibility getValueTypeVisibility()
public abstract com.google.common.collect.ImmutableList<com.google.common.base.Function<Metadata,Excerpt>> getNestedClasses()
public Metadata.Builder toBuilder()