Class AttributeDefinition<T>
- java.lang.Object
-
- org.infinispan.commons.configuration.attributes.AttributeDefinition<T>
-
public final class AttributeDefinition<T> extends Object
AttributeDefinition. Defines the characteristics of a configuration attribute. It is used to construct an actualAttribute
holder. An attribute definition has the following characteristics:- A name
- A default value or a value initializer
- A type, which needs to be specified if it cannot be inferred from the default value, i.e. when it is null
- Whether an attribute is immutable or not, i.e. whether its value is constant after initialization or it can be changed
- A validator which intercepts invalid values
- Since:
- 7.2
- Author:
- Tristan Tarrant
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AttributeDefinition.Builder<T>
-
Method Summary
-
-
-
Method Detail
-
name
public String name()
-
getDefaultValue
public T getDefaultValue()
-
isImmutable
public boolean isImmutable()
-
isAutoPersist
public boolean isAutoPersist()
-
isRepeated
public boolean isRepeated()
-
isGlobal
public boolean isGlobal()
-
copier
public AttributeCopier<T> copier()
-
initializer
public AttributeInitializer<? extends T> initializer()
-
serializer
public AttributeSerializer<? super T> serializer()
-
validate
public void validate(T value)
-
builder
public static <T> AttributeDefinition.Builder<T> builder(Enum<?> name, T defaultValue)
-
builder
public static <T> AttributeDefinition.Builder<T> builder(String name, T defaultValue)
-
builder
public static <T> AttributeDefinition.Builder<T> builder(Enum<?> name, T defaultValue, Class<T> klass)
-
builder
public static <T> AttributeDefinition.Builder<T> builder(String name, T defaultValue, Class<T> klass)
-
classBuilder
public static <T> AttributeDefinition.Builder<Class<? extends T>> classBuilder(String name, Class<T> klass)
-
supplierBuilder
public static <T> AttributeDefinition.Builder<Supplier<? extends T>> supplierBuilder(String name, Class<T> klass)
-
-