| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
Metadata.Builder |
addAllProperties(Iterable<? extends Metadata.Property> elements)
Adds each element of
elements to the list to be returned from
Metadata.getProperties(). |
Metadata.Builder |
addAllVisibleNestedTypes(Iterable<? extends QualifiedName> elements)
Adds each element of
elements to the set to be returned from
Metadata.getVisibleNestedTypes(), ignoring duplicate elements
(only the first duplicate element is added). |
Metadata.Builder |
addProperties(Metadata.Property... elements)
Adds each element of
elements to the list to be returned from
Metadata.getProperties(). |
Metadata.Builder |
addProperties(Metadata.Property element)
Adds
element to the list to be returned from Metadata.getProperties(). |
Metadata.Builder |
addVisibleNestedTypes(QualifiedName... elements)
Adds each element of
elements to the set to be returned from
Metadata.getVisibleNestedTypes(), ignoring duplicate elements
(only the first duplicate element is added). |
Metadata.Builder |
addVisibleNestedTypes(QualifiedName element)
Adds
element to the set to be returned from Metadata.getVisibleNestedTypes(). |
Metadata |
build()
Returns a newly-built
Metadata based on the content of the Builder. |
Metadata |
buildPartial()
Returns a newly-created partial
Metadata
based on the contents of the Builder. |
Metadata.Builder |
clear()
Resets the state of this builder.
|
Metadata.Builder |
clearBuilderFactory()
Sets the value to be returned by
Metadata.getBuilderFactory()
to Optional.absent(). |
Metadata.Builder |
clearOptionalBuilder()
Sets the value to be returned by
Metadata.getOptionalBuilder()
to Optional.absent(). |
Metadata.Builder |
clearProperties()
Clears the list to be returned from
Metadata.getProperties(). |
Metadata.Builder |
clearStandardMethodUnderrides()
Removes all of the mappings from the map to be returned from
Metadata.getStandardMethodUnderrides(). |
Metadata.Builder |
clearVisibleNestedTypes()
Clears the set to be returned from
Metadata.getVisibleNestedTypes(). |
com.google.common.base.Optional<BuilderFactory> |
getBuilderFactory()
Returns the value that will be returned by
Metadata.getBuilderFactory(). |
ParameterizedType |
getGeneratedBuilder()
Returns the value that will be returned by
Metadata.getGeneratedBuilder(). |
com.google.common.base.Optional<ParameterizedType> |
getOptionalBuilder()
Returns the value that will be returned by
Metadata.getOptionalBuilder(). |
ParameterizedType |
getPartialType()
Returns the value that will be returned by
Metadata.getPartialType(). |
List<Metadata.Property> |
getProperties()
Returns an unmodifiable view of the list that will be returned by
Metadata.getProperties(). |
ParameterizedType |
getPropertyEnum()
Returns the value that will be returned by
Metadata.getPropertyEnum(). |
Map<Metadata.StandardMethod,Metadata.UnderrideLevel> |
getStandardMethodUnderrides()
Returns an unmodifiable view of the map that will be returned by
Metadata.getStandardMethodUnderrides(). |
ParameterizedType |
getType()
Returns the value that will be returned by
Metadata.getType(). |
ParameterizedType |
getValueType()
Returns the value that will be returned by
Metadata.getValueType(). |
Set<QualifiedName> |
getVisibleNestedTypes()
Returns an unmodifiable view of the set that will be returned by
Metadata.getVisibleNestedTypes(). |
boolean |
isBuilderSerializable()
Returns the value that will be returned by
Metadata.isBuilderSerializable(). |
boolean |
isGwtCompatible()
Returns the value that will be returned by
Metadata.isGwtCompatible(). |
boolean |
isGwtSerializable()
Returns the value that will be returned by
Metadata.isGwtSerializable(). |
boolean |
isInterfaceType()
Returns the value that will be returned by
Metadata.isInterfaceType(). |
Metadata.Builder |
mergeFrom(Metadata.Builder template)
Copies values from the given
Builder. |
Metadata.Builder |
mergeFrom(Metadata value)
Sets all property values using the given
Metadata as a template. |
Metadata.Builder |
putAllStandardMethodUnderrides(Map<? extends Metadata.StandardMethod,? extends Metadata.UnderrideLevel> map)
Associates all of
map's keys and values in the map to be returned
from Metadata.getStandardMethodUnderrides(). |
Metadata.Builder |
putStandardMethodUnderrides(Metadata.StandardMethod key,
Metadata.UnderrideLevel value)
|
Metadata.Builder |
removeStandardMethodUnderrides(Metadata.StandardMethod key)
Removes the mapping for
key from the map to be returned from
Metadata.getStandardMethodUnderrides(). |
Metadata.Builder |
setBuilder(com.google.common.base.Optional<ParameterizedType> builder)
Sets the builder class that users will see, if any.
|
Metadata.Builder |
setBuilder(ParameterizedType builder)
Sets the builder class that users will see.
|
Metadata.Builder |
setBuilderFactory(BuilderFactory builderFactory)
Sets the value to be returned by
Metadata.getBuilderFactory(). |
Metadata.Builder |
setBuilderFactory(com.google.common.base.Optional<? extends BuilderFactory> builderFactory)
Sets the value to be returned by
Metadata.getBuilderFactory(). |
Metadata.Builder |
setBuilderSerializable(boolean builderSerializable)
Sets the value to be returned by
Metadata.isBuilderSerializable(). |
Metadata.Builder |
setGeneratedBuilder(ParameterizedType generatedBuilder)
Sets the value to be returned by
Metadata.getGeneratedBuilder(). |
Metadata.Builder |
setGwtCompatible(boolean gwtCompatible)
Sets the value to be returned by
Metadata.isGwtCompatible(). |
Metadata.Builder |
setGwtSerializable(boolean gwtSerializable)
Sets the value to be returned by
Metadata.isGwtSerializable(). |
Metadata.Builder |
setInterfaceType(boolean interfaceType)
Sets the value to be returned by
Metadata.isInterfaceType(). |
Metadata.Builder |
setNullableBuilderFactory(BuilderFactory builderFactory)
Sets the value to be returned by
Metadata.getBuilderFactory(). |
Metadata.Builder |
setNullableOptionalBuilder(ParameterizedType optionalBuilder)
Sets the value to be returned by
Metadata.getOptionalBuilder(). |
Metadata.Builder |
setOptionalBuilder(com.google.common.base.Optional<? extends ParameterizedType> optionalBuilder)
Sets the value to be returned by
Metadata.getOptionalBuilder(). |
Metadata.Builder |
setOptionalBuilder(ParameterizedType optionalBuilder)
Sets the value to be returned by
Metadata.getOptionalBuilder(). |
Metadata.Builder |
setPartialType(ParameterizedType partialType)
Sets the value to be returned by
Metadata.getPartialType(). |
Metadata.Builder |
setPropertyEnum(ParameterizedType propertyEnum)
Sets the value to be returned by
Metadata.getPropertyEnum(). |
Metadata.Builder |
setType(ParameterizedType type)
Sets the value to be returned by
Metadata.getType(). |
Metadata.Builder |
setValueType(ParameterizedType valueType)
Sets the value to be returned by
Metadata.getValueType(). |
public Metadata.Builder setBuilder(com.google.common.base.Optional<ParameterizedType> builder)
public Metadata.Builder setBuilder(ParameterizedType builder)
public Metadata.Builder setBuilderFactory(BuilderFactory builderFactory)
Metadata.getBuilderFactory().Builder objectNullPointerException - if builderFactory is nullpublic Metadata.Builder setBuilderFactory(com.google.common.base.Optional<? extends BuilderFactory> builderFactory)
Metadata.getBuilderFactory().Builder objectpublic Metadata.Builder setNullableBuilderFactory(@Nullable BuilderFactory builderFactory)
Metadata.getBuilderFactory().Builder objectpublic Metadata.Builder clearBuilderFactory()
Metadata.getBuilderFactory()
to Optional.absent().Builder objectpublic com.google.common.base.Optional<BuilderFactory> getBuilderFactory()
Metadata.getBuilderFactory().public Metadata.Builder setGeneratedBuilder(ParameterizedType generatedBuilder)
Metadata.getGeneratedBuilder().Builder objectNullPointerException - if generatedBuilder is nullpublic ParameterizedType getGeneratedBuilder()
Metadata.getGeneratedBuilder().IllegalStateException - if the field has not been setpublic Metadata.Builder setOptionalBuilder(ParameterizedType optionalBuilder)
Metadata.getOptionalBuilder().Builder objectNullPointerException - if optionalBuilder is nullpublic Metadata.Builder setOptionalBuilder(com.google.common.base.Optional<? extends ParameterizedType> optionalBuilder)
Metadata.getOptionalBuilder().Builder objectpublic Metadata.Builder setNullableOptionalBuilder(@Nullable ParameterizedType optionalBuilder)
Metadata.getOptionalBuilder().Builder objectpublic Metadata.Builder clearOptionalBuilder()
Metadata.getOptionalBuilder()
to Optional.absent().Builder objectpublic com.google.common.base.Optional<ParameterizedType> getOptionalBuilder()
Metadata.getOptionalBuilder().public Metadata.Builder setPartialType(ParameterizedType partialType)
Metadata.getPartialType().Builder objectNullPointerException - if partialType is nullpublic ParameterizedType getPartialType()
Metadata.getPartialType().IllegalStateException - if the field has not been setpublic Metadata.Builder addProperties(Metadata.Property element)
element to the list to be returned from Metadata.getProperties().Builder objectNullPointerException - if element is nullpublic Metadata.Builder addProperties(Metadata.Property... elements)
elements to the list to be returned from
Metadata.getProperties().Builder objectNullPointerException - if elements is null or contains a
null elementpublic Metadata.Builder addAllProperties(Iterable<? extends Metadata.Property> elements)
elements to the list to be returned from
Metadata.getProperties().Builder objectNullPointerException - if elements is null or contains a
null elementpublic Metadata.Builder clearProperties()
Metadata.getProperties().Builder objectpublic List<Metadata.Property> getProperties()
Metadata.getProperties().
Changes to this builder will be reflected in the view.public Metadata.Builder setPropertyEnum(ParameterizedType propertyEnum)
Metadata.getPropertyEnum().Builder objectNullPointerException - if propertyEnum is nullpublic ParameterizedType getPropertyEnum()
Metadata.getPropertyEnum().IllegalStateException - if the field has not been setpublic Metadata.Builder putStandardMethodUnderrides(Metadata.StandardMethod key, Metadata.UnderrideLevel value)
key with value in the map to be returned from
Metadata.getStandardMethodUnderrides().
Duplicate keys are not allowed.Builder objectNullPointerException - if either key or value are nullIllegalArgumentException - if key is already presentpublic Metadata.Builder putAllStandardMethodUnderrides(Map<? extends Metadata.StandardMethod,? extends Metadata.UnderrideLevel> map)
map's keys and values in the map to be returned
from Metadata.getStandardMethodUnderrides().
Duplicate keys are not allowed.Builder objectNullPointerException - if map is null or contains a
null key or valueIllegalArgumentException - if any key is already presentpublic Metadata.Builder removeStandardMethodUnderrides(Metadata.StandardMethod key)
key from the map to be returned from
Metadata.getStandardMethodUnderrides().Builder objectNullPointerException - if key is nullIllegalArgumentException - if key is not presentpublic Metadata.Builder clearStandardMethodUnderrides()
Metadata.getStandardMethodUnderrides().Builder objectpublic Map<Metadata.StandardMethod,Metadata.UnderrideLevel> getStandardMethodUnderrides()
Metadata.getStandardMethodUnderrides().
Changes to this builder will be reflected in the view.public Metadata.Builder setType(ParameterizedType type)
Metadata.getType().Builder objectNullPointerException - if type is nullpublic ParameterizedType getType()
Metadata.getType().IllegalStateException - if the field has not been setpublic Metadata.Builder setValueType(ParameterizedType valueType)
Metadata.getValueType().Builder objectNullPointerException - if valueType is nullpublic ParameterizedType getValueType()
Metadata.getValueType().IllegalStateException - if the field has not been setpublic Metadata.Builder addVisibleNestedTypes(QualifiedName element)
element to the set to be returned from Metadata.getVisibleNestedTypes().
If the set already contains element, then addVisibleNestedTypes
has no effect (only the previously added element is retained).Builder objectNullPointerException - if element is nullpublic Metadata.Builder addVisibleNestedTypes(QualifiedName... elements)
elements to the set to be returned from
Metadata.getVisibleNestedTypes(), ignoring duplicate elements
(only the first duplicate element is added).Builder objectNullPointerException - if elements is null or contains a
null elementpublic Metadata.Builder addAllVisibleNestedTypes(Iterable<? extends QualifiedName> elements)
elements to the set to be returned from
Metadata.getVisibleNestedTypes(), ignoring duplicate elements
(only the first duplicate element is added).Builder objectNullPointerException - if elements is null or contains a
null elementpublic Metadata.Builder clearVisibleNestedTypes()
Metadata.getVisibleNestedTypes().Builder objectpublic Set<QualifiedName> getVisibleNestedTypes()
Metadata.getVisibleNestedTypes().
Changes to this builder will be reflected in the view.public Metadata.Builder setBuilderSerializable(boolean builderSerializable)
Metadata.isBuilderSerializable().Builder objectpublic boolean isBuilderSerializable()
Metadata.isBuilderSerializable().IllegalStateException - if the field has not been setpublic Metadata.Builder setGwtCompatible(boolean gwtCompatible)
Metadata.isGwtCompatible().Builder objectpublic boolean isGwtCompatible()
Metadata.isGwtCompatible().IllegalStateException - if the field has not been setpublic Metadata.Builder setGwtSerializable(boolean gwtSerializable)
Metadata.isGwtSerializable().Builder objectpublic boolean isGwtSerializable()
Metadata.isGwtSerializable().IllegalStateException - if the field has not been setpublic Metadata.Builder setInterfaceType(boolean interfaceType)
Metadata.isInterfaceType().Builder objectpublic boolean isInterfaceType()
Metadata.isInterfaceType().IllegalStateException - if the field has not been setpublic Metadata.Builder mergeFrom(Metadata value)
Metadata as a template.public Metadata.Builder mergeFrom(Metadata.Builder template)
Builder.
Does not affect any properties not set on the input.public Metadata.Builder clear()
public Metadata buildPartial()
Metadata
based on the contents of the Builder.
State checking will not be performed.
Unset properties will throw an UnsupportedOperationException
when accessed via the partial object.
Partials should only ever be used in tests.
Copyright © 2016 Google, Inc.. All rights reserved.