@NotThreadSafe public static final class ImmutablePluginConfig.Builder extends Object
ImmutablePluginConfig.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
| Modifier and Type | Method and Description |
|---|---|
ImmutablePluginConfig |
build()
Builds a new
ImmutablePluginConfig. |
ImmutablePluginConfig.Builder |
copyFrom(PluginConfig instance)
Fill a builder with attribute values from the provided
PluginConfig instance. |
ImmutablePluginConfig.Builder |
pluginDescriptor(PluginDescriptor pluginDescriptor)
Initializes the value for the
pluginDescriptor attribute. |
ImmutablePluginConfig.Builder |
properties(Map<String,? extends PropertyValue> entries)
Sets or replaces all mappings from the specified map as entries for the
properties map. |
ImmutablePluginConfig.Builder |
putAllProperties(Map<String,? extends PropertyValue> entries)
Put all mappings from the specified map as entries to
properties map. |
ImmutablePluginConfig.Builder |
putProperties(Map.Entry<String,? extends PropertyValue> entry)
Put one entry to the
properties map. |
ImmutablePluginConfig.Builder |
putProperties(String key,
PropertyValue value)
Put one entry to the
properties map. |
public ImmutablePluginConfig build()
ImmutablePluginConfig.IllegalStateException - if any required attributes are missingpublic final ImmutablePluginConfig.Builder copyFrom(PluginConfig instance)
PluginConfig instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.
Collection elements and entries will be added, not replaced.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final ImmutablePluginConfig.Builder pluginDescriptor(PluginDescriptor pluginDescriptor)
pluginDescriptor attribute.pluginDescriptor - The value for pluginDescriptorthis builder for use in a chained invocationpublic final ImmutablePluginConfig.Builder properties(Map<String,? extends PropertyValue> entries)
properties map. Nulls are not permittedentries - The entries that will be added to the properties mapthis builder for use in a chained invocationpublic final ImmutablePluginConfig.Builder putAllProperties(Map<String,? extends PropertyValue> entries)
properties map. Nulls are not permittedentries - The entries that will be added to the properties mapthis builder for use in a chained invocationpublic final ImmutablePluginConfig.Builder putProperties(Map.Entry<String,? extends PropertyValue> entry)
properties map. Nulls are not permittedentry - The key and value entrythis builder for use in a chained invocationpublic final ImmutablePluginConfig.Builder putProperties(String key, PropertyValue value)
properties map.key - The key in the properties mapvalue - The associated value in the properties mapthis builder for use in a chained invocationCopyright © 2011–2020 Glowroot contributors. All rights reserved.