Class ConfigurationElement<T extends ConfigurationElement>
- java.lang.Object
-
- org.infinispan.commons.configuration.attributes.ConfigurationElement<T>
-
- Direct Known Subclasses:
CounterManagerConfiguration
public abstract class ConfigurationElement<T extends ConfigurationElement> extends Object implements Matchable<T>, Updatable<T>
An abstract class which represents a configuration element, with attributes and child elements.- Since:
- 13.0
- Author:
- Gustavo Fernandes, Tristan Tarrant
-
-
Field Summary
Fields Modifier and Type Field Description protected AttributeSetattributesstatic ConfigurationElement<?>[]CHILDLESSprotected ConfigurationElement<?>[]childrenprotected Stringelementprotected booleanrepeated
-
Constructor Summary
Constructors Modifier Constructor Description protectedConfigurationElement(Enum<?> element, AttributeSet attributes, ConfigurationElement<?>... children)protectedConfigurationElement(String element, boolean repeated, AttributeSet attributes, ConfigurationElement<?>... children)protectedConfigurationElement(String element, AttributeSet attributes, ConfigurationElement<?>... children)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AttributeSetattributes()protected static ConfigurationElement<?>child(Attribute<?> attribute)ConfigurationElement<?>[]children()protected static <T> ConfigurationElement<?>[]children(Collection<T> children)StringelementName()booleanequals(Object o)Attribute<?>findAttribute(String name)inthashCode()booleanisModified()protected static <T extends ConfigurationElement>
ConfigurationElement<T>list(Enum<?> element, List<T> list)booleanmatches(T other)StringtoString()voidupdate(String parentName, T other)Updates the mutable part of this instance with the values of the other instancevoidvalidateUpdate(String parentName, T other)Verifies that updating the mutable part of this instance with the values of the other instance is possiblevoidwrite(ConfigurationWriter writer)Writes thisConfigurationElementto the writer
-
-
-
Field Detail
-
CHILDLESS
public static final ConfigurationElement<?>[] CHILDLESS
-
element
protected final String element
-
attributes
protected final AttributeSet attributes
-
children
protected final ConfigurationElement<?>[] children
-
repeated
protected final boolean repeated
-
-
Constructor Detail
-
ConfigurationElement
protected ConfigurationElement(Enum<?> element, AttributeSet attributes, ConfigurationElement<?>... children)
-
ConfigurationElement
protected ConfigurationElement(String element, AttributeSet attributes, ConfigurationElement<?>... children)
-
ConfigurationElement
protected ConfigurationElement(String element, boolean repeated, AttributeSet attributes, ConfigurationElement<?>... children)
-
-
Method Detail
-
elementName
public final String elementName()
-
attributes
public final AttributeSet attributes()
-
children
public ConfigurationElement<?>[] children()
-
list
protected static <T extends ConfigurationElement> ConfigurationElement<T> list(Enum<?> element, List<T> list)
-
matches
public boolean matches(T other)
- Specified by:
matchesin interfaceMatchable<T extends ConfigurationElement>
-
update
public void update(String parentName, T other)
Description copied from interface:UpdatableUpdates the mutable part of this instance with the values of the other instance- Specified by:
updatein interfaceUpdatable<T extends ConfigurationElement>
-
validateUpdate
public void validateUpdate(String parentName, T other)
Description copied from interface:UpdatableVerifies that updating the mutable part of this instance with the values of the other instance is possible- Specified by:
validateUpdatein interfaceUpdatable<T extends ConfigurationElement>
-
isModified
public boolean isModified()
-
write
public void write(ConfigurationWriter writer)
Writes thisConfigurationElementto the writer- Parameters:
writer-
-
children
protected static <T> ConfigurationElement<?>[] children(Collection<T> children)
-
child
protected static ConfigurationElement<?> child(Attribute<?> attribute)
-
-