Class AttributeDefinition<T>
java.lang.Object
org.infinispan.commons.configuration.attributes.AttributeDefinition<T>
AttributeDefinition. Defines the characteristics of a configuration attribute. It is used to
construct an actual
Attribute
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
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> AttributeDefinition.Builder
<T> static <T> AttributeDefinition.Builder
<T> static <T> AttributeDefinition.Builder
<T> static <T> AttributeDefinition.Builder
<T> static <T> AttributeDefinition.Builder
<Class<? extends T>> classBuilder
(String name, Class<T> klass) copier()
boolean
getType()
int
hashCode()
AttributeInitializer
<? extends T> boolean
boolean
isDeprecated
(int major, int minor) boolean
isGlobal()
boolean
boolean
boolean
isSince
(int major, int minor) matcher()
name()
AttributeSerializer
<? super T> static <T> AttributeDefinition.Builder
<Supplier<? extends T>> supplierBuilder
(String name, Class<T> klass) void
-
Method Details
-
name
-
getType
-
getDefaultValue
-
isImmutable
public boolean isImmutable() -
isAutoPersist
public boolean isAutoPersist() -
isRepeated
public boolean isRepeated() -
isGlobal
public boolean isGlobal() -
isDeprecated
public boolean isDeprecated(int major, int minor) -
isSince
public boolean isSince(int major, int minor) -
copier
-
initializer
-
matcher
-
serializer
-
parse
-
toAttribute
-
validate
-
builder
-
builder
-
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) -
equals
-
hashCode
public int hashCode()
-