@Generated(value="org.immutables.processor.ProxyProcessor") public final class ImmutableTemplateReference extends Object implements TemplateReference
TemplateReference.
Use the builder to create immutable instances:
ImmutableTemplateReference.builder().
Use the static factory method to create immutable instances:
ImmutableTemplateReference.of().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableTemplateReference.Builder
Builds instances of type
ImmutableTemplateReference. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableTemplateReference.Builder |
builder()
Creates a builder for
ImmutableTemplateReference. |
Class<?> |
clazz() |
static ImmutableTemplateReference |
copyOf(TemplateReference instance)
Creates an immutable copy of a
TemplateReference value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableTemplateReference that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
clazz, templateName, replacementPattern. |
static ImmutableTemplateReference |
of(Class<?> clazz,
String templateName)
Construct a new immutable
TemplateReference instance. |
Optional<String> |
readContent()
Returns a lazily initialized value of the
readContent attribute. |
ReplacementPattern |
replacementPattern() |
String |
templateName() |
String |
toString()
Prints the immutable value
TemplateReference with attribute values. |
ImmutableTemplateReference |
withClazz(Class<?> value)
Copy the current immutable object by setting a value for the
clazz attribute. |
ImmutableTemplateReference |
withReplacementPattern(ReplacementPattern value)
Copy the current immutable object by setting a value for the
replacementPattern attribute. |
ImmutableTemplateReference |
withTemplateName(String value)
Copy the current immutable object by setting a value for the
templateName attribute. |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitof, readContentpublic Class<?> clazz()
clazz in interface TemplateReferenceclazz attributepublic String templateName()
templateName in interface TemplateReferencetemplateName attributepublic ReplacementPattern replacementPattern()
replacementPattern in interface TemplateReferencereplacementPattern attributepublic final ImmutableTemplateReference withClazz(Class<?> value)
clazz attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for clazzthis objectpublic final ImmutableTemplateReference withTemplateName(String value)
templateName attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for templateNamethis objectpublic final ImmutableTemplateReference withReplacementPattern(ReplacementPattern value)
replacementPattern attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for replacementPatternthis objectpublic boolean equals(Object another)
ImmutableTemplateReference that have equal attribute values.public int hashCode()
clazz, templateName, replacementPattern.public String toString()
TemplateReference with attribute values.public Optional<String> readContent()
Returns a lazily initialized value of the readContent attribute.
Initialized once and only once and stored for subsequent access with proper synchronization.
In case of any exception or error thrown by the lazy value initializer,
the result will not be memoised (i.e. remembered) and on next call computation
will be attempted again.
readContent in interface TemplateReferencereadContent attributepublic static ImmutableTemplateReference of(Class<?> clazz, String templateName)
TemplateReference instance.of in interface TemplateReferenceclazz - The value for the clazz attributetemplateName - The value for the templateName attributepublic static ImmutableTemplateReference copyOf(TemplateReference instance)
TemplateReference value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copypublic static ImmutableTemplateReference.Builder builder()
ImmutableTemplateReference.
ImmutableTemplateReference.builder()
.clazz(Class<?>) // required clazz
.templateName(String) // required templateName
.replacementPattern(de.flapdoodle.testdoc.ReplacementPattern) // optional replacementPattern
.build();
Copyright © 2023. All rights reserved.