public abstract class BuildableType
extends java.lang.Object
A buildable type is one with a Builder class providing a similar API to proto or @FreeBuilder:
| Modifier and Type | Class and Description |
|---|---|
static class |
BuildableType.Builder |
static class |
BuildableType.MergeBuilderMethod
How to merge the values from one Builder into another.
|
static class |
BuildableType.PartialToBuilderMethod
How to convert a partial value into a Builder.
|
| Constructor and Description |
|---|
BuildableType() |
| Modifier and Type | Method and Description |
|---|---|
abstract BuilderFactory |
builderFactory() |
abstract Type |
builderType()
Returns the builder type that will build instances of
type(). |
static BuildableType |
create(javax.lang.model.type.DeclaredType datatype,
javax.lang.model.type.DeclaredType builder,
javax.lang.model.util.Elements elements,
javax.lang.model.util.Types types) |
static java.util.Optional<javax.lang.model.type.DeclaredType> |
maybeBuilder(javax.lang.model.type.DeclaredType type,
javax.lang.model.util.Elements elements,
javax.lang.model.util.Types types) |
abstract BuildableType.MergeBuilderMethod |
mergeBuilder() |
Excerpt |
newBuilder(BuilderFactory.TypeInference typeInference)
Returns an excerpt calling the Builder factory method.
|
abstract BuildableType.PartialToBuilderMethod |
partialToBuilder() |
abstract Excerpt |
suppressUnchecked() |
abstract Type |
type()
Returns the parameterized buildable type.
|
public abstract Type type()
This may be parameterized with any compatible types, including concrete types, wildcards, type variables, or generic types containing any combination of the above.
public abstract Type builderType()
type().public abstract BuildableType.MergeBuilderMethod mergeBuilder()
public abstract BuildableType.PartialToBuilderMethod partialToBuilder()
public abstract BuilderFactory builderFactory()
public abstract Excerpt suppressUnchecked()
public Excerpt newBuilder(BuilderFactory.TypeInference typeInference)
public static java.util.Optional<javax.lang.model.type.DeclaredType> maybeBuilder(javax.lang.model.type.DeclaredType type,
javax.lang.model.util.Elements elements,
javax.lang.model.util.Types types)
public static BuildableType create(javax.lang.model.type.DeclaredType datatype, javax.lang.model.type.DeclaredType builder, javax.lang.model.util.Elements elements, javax.lang.model.util.Types types)