| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
Metadata.Builder |
addAllGeneratedBuilderAnnotations(java.lang.Iterable<? extends Excerpt> elements)
Adds each element of
elements to the list to be returned from
Metadata.getGeneratedBuilderAnnotations(). |
Metadata.Builder |
addAllNestedClasses(java.lang.Iterable<? extends com.google.common.base.Function<Metadata,Excerpt>> elements)
Adds each element of
elements to the list to be returned from
Metadata.getNestedClasses(). |
Metadata.Builder |
addAllProperties(java.lang.Iterable<? extends Metadata.Property> elements)
Adds each element of
elements to the list to be returned from
Metadata.getProperties(). |
Metadata.Builder |
addAllValueTypeAnnotations(java.lang.Iterable<? extends Excerpt> elements)
Adds each element of
elements to the list to be returned from
Metadata.getValueTypeAnnotations(). |
Metadata.Builder |
addAllVisibleNestedTypes(java.lang.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 |
addGeneratedBuilderAnnotations(Excerpt... elements)
Adds each element of
elements to the list to be returned from
Metadata.getGeneratedBuilderAnnotations(). |
Metadata.Builder |
addGeneratedBuilderAnnotations(Excerpt element)
Adds
element to the list to be returned from Metadata.getGeneratedBuilderAnnotations(). |
Metadata.Builder |
addNestedClasses(com.google.common.base.Function<Metadata,Excerpt>... elements)
Adds each element of
elements to the list to be returned from
Metadata.getNestedClasses(). |
Metadata.Builder |
addNestedClasses(com.google.common.base.Function<Metadata,Excerpt> element)
Adds
element to the list to be returned from Metadata.getNestedClasses(). |
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 |
addValueTypeAnnotations(Excerpt... elements)
Adds each element of
elements to the list to be returned from
Metadata.getValueTypeAnnotations(). |
Metadata.Builder |
addValueTypeAnnotations(Excerpt element)
Adds
element to the list to be returned from Metadata.getValueTypeAnnotations(). |
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 |
clearGeneratedBuilderAnnotations()
Clears the list to be returned from
Metadata.getGeneratedBuilderAnnotations(). |
Metadata.Builder |
clearNestedClasses()
Clears the list to be returned from
Metadata.getNestedClasses(). |
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 |
clearValueTypeAnnotations()
Clears the list to be returned from
Metadata.getValueTypeAnnotations(). |
Metadata.Builder |
clearVisibleNestedTypes()
Clears the set to be returned from
Metadata.getVisibleNestedTypes(). |
static Metadata.Builder |
from(Metadata value)
Creates a new builder using
value as a template. |
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(). |
java.util.List<Excerpt> |
getGeneratedBuilderAnnotations()
Returns an unmodifiable view of the list that will be returned by
Metadata.getGeneratedBuilderAnnotations(). |
java.util.List<com.google.common.base.Function<Metadata,Excerpt>> |
getNestedClasses()
Returns an unmodifiable view of the list that will be returned by
Metadata.getNestedClasses(). |
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(). |
java.util.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(). |
java.util.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(). |
java.util.List<Excerpt> |
getValueTypeAnnotations()
Returns an unmodifiable view of the list that will be returned by
Metadata.getValueTypeAnnotations(). |
Metadata.Visibility |
getValueTypeVisibility()
Returns the value that will be returned by
Metadata.getValueTypeVisibility(). |
java.util.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 |
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(java.util.Map<? extends Metadata.StandardMethod,? extends Metadata.UnderrideLevel> map)
Copies all of the mappings from
map to 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(), if one is present. |
Metadata.Builder |
removeVisibleNestedTypes(QualifiedName element)
Removes
element from the set to be returned from Metadata.getVisibleNestedTypes(). |
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 |
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(). |
Metadata.Builder |
setValueTypeVisibility(Metadata.Visibility visibility)
Sets the value to be returned by
Metadata.getValueTypeVisibility() to the most
visible of the current value and visibility. |
public Metadata.Builder setValueTypeVisibility(Metadata.Visibility visibility)
Metadata.getValueTypeVisibility() to the most
visible of the current value and visibility. Will not decrease visibility.Builder objectjava.lang.NullPointerException - if visibility is nullpublic Metadata.Builder setBuilder(com.google.common.base.Optional<ParameterizedType> builder)
public Metadata.Builder setBuilder(ParameterizedType builder)
public static Metadata.Builder from(Metadata value)
value as a template.public Metadata.Builder setType(ParameterizedType type)
Metadata.getType().Builder objectjava.lang.NullPointerException - if type is nullpublic ParameterizedType getType()
Metadata.getType().java.lang.IllegalStateException - if the field has not been setpublic Metadata.Builder setInterfaceType(boolean interfaceType)
Metadata.isInterfaceType().Builder objectpublic boolean isInterfaceType()
Metadata.isInterfaceType().java.lang.IllegalStateException - if the field has not been setpublic Metadata.Builder setOptionalBuilder(ParameterizedType optionalBuilder)
Metadata.getOptionalBuilder().Builder objectjava.lang.NullPointerException - 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 setBuilderFactory(BuilderFactory builderFactory)
Metadata.getBuilderFactory().Builder objectjava.lang.NullPointerException - 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 objectjava.lang.NullPointerException - if generatedBuilder is nullpublic ParameterizedType getGeneratedBuilder()
Metadata.getGeneratedBuilder().java.lang.IllegalStateException - if the field has not been setpublic Metadata.Builder setValueType(ParameterizedType valueType)
Metadata.getValueType().Builder objectjava.lang.NullPointerException - if valueType is nullpublic ParameterizedType getValueType()
Metadata.getValueType().java.lang.IllegalStateException - if the field has not been setpublic Metadata.Builder setPartialType(ParameterizedType partialType)
Metadata.getPartialType().Builder objectjava.lang.NullPointerException - if partialType is nullpublic ParameterizedType getPartialType()
Metadata.getPartialType().java.lang.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 objectjava.lang.NullPointerException - 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 objectjava.lang.NullPointerException - if elements is null or contains a
null elementpublic Metadata.Builder addAllVisibleNestedTypes(java.lang.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 objectjava.lang.NullPointerException - if elements is null or contains a
null elementpublic Metadata.Builder removeVisibleNestedTypes(QualifiedName element)
element from the set to be returned from Metadata.getVisibleNestedTypes().
Does nothing if element is not a member of the set.Builder objectjava.lang.NullPointerException - if element is nullpublic Metadata.Builder clearVisibleNestedTypes()
Metadata.getVisibleNestedTypes().Builder objectpublic java.util.Set<QualifiedName> getVisibleNestedTypes()
Metadata.getVisibleNestedTypes().
Changes to this builder will be reflected in the view.public Metadata.Builder setPropertyEnum(ParameterizedType propertyEnum)
Metadata.getPropertyEnum().Builder objectjava.lang.NullPointerException - if propertyEnum is nullpublic ParameterizedType getPropertyEnum()
Metadata.getPropertyEnum().java.lang.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 objectjava.lang.NullPointerException - if element is nullpublic Metadata.Builder addProperties(Metadata.Property... elements)
elements to the list to be returned from
Metadata.getProperties().Builder objectjava.lang.NullPointerException - if elements is null or contains a
null elementpublic Metadata.Builder addAllProperties(java.lang.Iterable<? extends Metadata.Property> elements)
elements to the list to be returned from
Metadata.getProperties().Builder objectjava.lang.NullPointerException - if elements is null or contains a
null elementpublic Metadata.Builder clearProperties()
Metadata.getProperties().Builder objectpublic java.util.List<Metadata.Property> getProperties()
Metadata.getProperties().
Changes to this builder will be reflected in the view.public Metadata.Builder putStandardMethodUnderrides(Metadata.StandardMethod key, Metadata.UnderrideLevel value)
key with value in the map to be returned from
Metadata.getStandardMethodUnderrides().
If the map previously contained a mapping for the key,
the old value is replaced by the specified value.Builder objectjava.lang.NullPointerException - if either key or value are nullpublic Metadata.Builder putAllStandardMethodUnderrides(java.util.Map<? extends Metadata.StandardMethod,? extends Metadata.UnderrideLevel> map)
map to the map to be returned from
Metadata.getStandardMethodUnderrides().Builder objectjava.lang.NullPointerException - if map is null or contains a
null key or valuepublic Metadata.Builder removeStandardMethodUnderrides(Metadata.StandardMethod key)
key from the map to be returned from
Metadata.getStandardMethodUnderrides(), if one is present.Builder objectjava.lang.NullPointerException - if key is nullpublic Metadata.Builder clearStandardMethodUnderrides()
Metadata.getStandardMethodUnderrides().Builder objectpublic java.util.Map<Metadata.StandardMethod,Metadata.UnderrideLevel> getStandardMethodUnderrides()
Metadata.getStandardMethodUnderrides().
Changes to this builder will be reflected in the view.public Metadata.Builder setBuilderSerializable(boolean builderSerializable)
Metadata.isBuilderSerializable().Builder objectpublic boolean isBuilderSerializable()
Metadata.isBuilderSerializable().java.lang.IllegalStateException - if the field has not been setpublic Metadata.Builder addGeneratedBuilderAnnotations(Excerpt element)
element to the list to be returned from Metadata.getGeneratedBuilderAnnotations().Builder objectjava.lang.NullPointerException - if element is nullpublic Metadata.Builder addGeneratedBuilderAnnotations(Excerpt... elements)
elements to the list to be returned from
Metadata.getGeneratedBuilderAnnotations().Builder objectjava.lang.NullPointerException - if elements is null or contains a
null elementpublic Metadata.Builder addAllGeneratedBuilderAnnotations(java.lang.Iterable<? extends Excerpt> elements)
elements to the list to be returned from
Metadata.getGeneratedBuilderAnnotations().Builder objectjava.lang.NullPointerException - if elements is null or contains a
null elementpublic Metadata.Builder clearGeneratedBuilderAnnotations()
Metadata.getGeneratedBuilderAnnotations().Builder objectpublic java.util.List<Excerpt> getGeneratedBuilderAnnotations()
Metadata.getGeneratedBuilderAnnotations().
Changes to this builder will be reflected in the view.public Metadata.Builder addValueTypeAnnotations(Excerpt element)
element to the list to be returned from Metadata.getValueTypeAnnotations().Builder objectjava.lang.NullPointerException - if element is nullpublic Metadata.Builder addValueTypeAnnotations(Excerpt... elements)
elements to the list to be returned from
Metadata.getValueTypeAnnotations().Builder objectjava.lang.NullPointerException - if elements is null or contains a
null elementpublic Metadata.Builder addAllValueTypeAnnotations(java.lang.Iterable<? extends Excerpt> elements)
elements to the list to be returned from
Metadata.getValueTypeAnnotations().Builder objectjava.lang.NullPointerException - if elements is null or contains a
null elementpublic Metadata.Builder clearValueTypeAnnotations()
Metadata.getValueTypeAnnotations().Builder objectpublic java.util.List<Excerpt> getValueTypeAnnotations()
Metadata.getValueTypeAnnotations().
Changes to this builder will be reflected in the view.public Metadata.Visibility getValueTypeVisibility()
Metadata.getValueTypeVisibility().java.lang.IllegalStateException - if the field has not been setpublic Metadata.Builder addNestedClasses(com.google.common.base.Function<Metadata,Excerpt> element)
element to the list to be returned from Metadata.getNestedClasses().Builder objectjava.lang.NullPointerException - if element is nullpublic Metadata.Builder addNestedClasses(com.google.common.base.Function<Metadata,Excerpt>... elements)
elements to the list to be returned from
Metadata.getNestedClasses().Builder objectjava.lang.NullPointerException - if elements is null or contains a
null elementpublic Metadata.Builder addAllNestedClasses(java.lang.Iterable<? extends com.google.common.base.Function<Metadata,Excerpt>> elements)
elements to the list to be returned from
Metadata.getNestedClasses().Builder objectjava.lang.NullPointerException - if elements is null or contains a
null elementpublic Metadata.Builder clearNestedClasses()
Metadata.getNestedClasses().Builder objectpublic java.util.List<com.google.common.base.Function<Metadata,Excerpt>> getNestedClasses()
Metadata.getNestedClasses().
Changes to this builder will be reflected in the view.public 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.