Class AbstractPropertyConfiguration<T, C extends AbstractPropertyConfiguration<T,C> >
java.lang.Object
org.jboss.logmanager.config.AbstractBasicConfiguration<T,C>
org.jboss.logmanager.config.AbstractPropertyConfiguration<T,C>
- All Implemented Interfaces:
NamedConfigurable, ObjectConfigurable, PropertyConfigurable
- Direct Known Subclasses:
ErrorManagerConfigurationImpl, FilterConfigurationImpl, FormatterConfigurationImpl, HandlerConfigurationImpl, PojoConfigurationImpl
abstract class AbstractPropertyConfiguration<T, C extends AbstractPropertyConfiguration<T,C>>
extends AbstractBasicConfiguration<T,C>
implements ObjectConfigurable, PropertyConfigurable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) class(package private) static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Stringprivate final String[]private final Stringprivate final Map<String, ValueExpression<String>> Fields inherited from class AbstractBasicConfiguration
configs, refs -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidprivate voidaddPostConfigurationActions(boolean replace) booleanaddPostConfigurationMethod(String methodName) Adds a method name to be invoked after all properties have been set.(package private) static booleanGet the class name for this object's configuration.(package private) ConfigAction<T> Returns a collection of the constructor properties.(package private) static Class<?> getConstructorPropertyType(Class<?> clazz, String propertyName) (package private) abstract StringGet the module name for this object's configuration, if any.Returns a collection of the methods to be invoked after the properties have been set.(package private) static MethodgetPropertyGetter(Class<?> clazz, String propertyName) Get the names of the configured properties in order.(package private) static MethodgetPropertySetter(Class<?> clazz, String propertyName) (package private) static Class<?> getPropertyType(Class<?> clazz, String propertyName) getPropertyValueExpression(String propertyName) Get the property value.getPropertyValueString(String propertyName) Get the string property value with the given name.booleanhasConstructorProperty(String propertyName) Determine whether the given property name is a constructor property.booleanhasProperty(String propertyName) Determine whether the given property name is configured.protected final Deque<?> booleanremovePostConfigurationMethod(String methodName) Removes the post configuration method.booleanremoveProperty(String propertyName) Remove a configured property.voidsetPostConfigurationMethods(String... methodNames) Sets the method names to be invoked after the properties have been set.voidsetPostConfigurationMethods(List<String> methodNames) Sets the method names to be invoked after the properties have been set.voidsetPropertyValueExpression(String propertyName, String expression) Sets the expression value for the property.voidsetPropertyValueExpression(String propertyName, String expression, String value) Sets the expression value for the property.private voidsetPropertyValueExpression(String propertyName, ValueExpression<String> expression) voidsetPropertyValueString(String propertyName, String value) Set a property value from a string.Methods inherited from class AbstractBasicConfiguration
clearRemoved, getConfigs, getConfiguration, getName, getRefs, getRemoveAction, isRemoved, setRemoved
-
Field Details
-
actualClass
-
moduleName
-
className
-
constructorProperties
-
properties
-
postConfigurationMethods
-
-
Constructor Details
-
AbstractPropertyConfiguration
-
-
Method Details
-
getConstructAction
ConfigAction<T> getConstructAction() -
getDescription
-
getModuleName
Description copied from interface:ObjectConfigurableGet the module name for this object's configuration, if any. If JBoss Modules is not present on the class path, onlynullvalues are accepted.- Specified by:
getModuleNamein interfaceObjectConfigurable- Returns:
- the module name, or
nullif none is configured
-
getClassName
Description copied from interface:ObjectConfigurableGet the class name for this object's configuration.- Specified by:
getClassNamein interfaceObjectConfigurable- Returns:
- the class name
-
contains
-
setPropertyValueString
public void setPropertyValueString(String propertyName, String value) throws IllegalArgumentException Description copied from interface:PropertyConfigurableSet a property value from a string.- Specified by:
setPropertyValueStringin interfacePropertyConfigurable- Parameters:
propertyName- the property namevalue- the property value- Throws:
IllegalArgumentException- if the given value is not acceptable for this property
-
getPropertyValueString
Description copied from interface:PropertyConfigurableGet the string property value with the given name.- Specified by:
getPropertyValueStringin interfacePropertyConfigurable- Parameters:
propertyName- the property name- Returns:
- the property value string
-
getPropertyValueExpression
Description copied from interface:PropertyConfigurableGet the property value.- Specified by:
getPropertyValueExpressionin interfacePropertyConfigurable- Parameters:
propertyName- the property name- Returns:
- the property value
-
setPropertyValueExpression
Description copied from interface:PropertyConfigurableSets the expression value for the property.- Specified by:
setPropertyValueExpressionin interfacePropertyConfigurable- Parameters:
propertyName- the name of the propertyexpression- the expression used to resolve the value
-
setPropertyValueExpression
Description copied from interface:PropertyConfigurableSets the expression value for the property. This method will not parse the expression for the value and instead use thevalueparameter for the value.- Specified by:
setPropertyValueExpressionin interfacePropertyConfigurable- Parameters:
propertyName- the name of the propertyexpression- the expression used to resolve the valuevalue- the value to use
-
setPropertyValueExpression
-
hasProperty
Description copied from interface:PropertyConfigurableDetermine whether the given property name is configured.- Specified by:
hasPropertyin interfacePropertyConfigurable- Parameters:
propertyName- the property name to test- Returns:
trueif the name is configured,falseotherwise
-
removeProperty
Description copied from interface:PropertyConfigurableRemove a configured property. Does not affect the underlying configured value; just removes it from the configuration.- Specified by:
removePropertyin interfacePropertyConfigurable- Parameters:
propertyName- the property name- Returns:
trueif the property name was removed,falseif it was not present
-
getPropertyNames
Description copied from interface:PropertyConfigurableGet the names of the configured properties in order.- Specified by:
getPropertyNamesin interfacePropertyConfigurable- Returns:
- the property names
-
hasConstructorProperty
Description copied from interface:PropertyConfigurableDetermine whether the given property name is a constructor property.- Specified by:
hasConstructorPropertyin interfacePropertyConfigurable- Parameters:
propertyName- the name of the property to check.- Returns:
trueif the property should be used as a construction property, otherwisefalse.
-
getActualClass
-
getConstructorProperties
Description copied from interface:PropertyConfigurableReturns a collection of the constructor properties.- Specified by:
getConstructorPropertiesin interfacePropertyConfigurable- Returns:
- a collection of the constructor properties.
-
addPostConfigurationMethod
Description copied from interface:PropertyConfigurableAdds a method name to be invoked after all properties have been set.- Specified by:
addPostConfigurationMethodin interfacePropertyConfigurable- Parameters:
methodName- the name of the method- Returns:
trueif the method was successfully added, otherwisefalse
-
getPostConfigurationMethods
Description copied from interface:PropertyConfigurableReturns a collection of the methods to be invoked after the properties have been set.- Specified by:
getPostConfigurationMethodsin interfacePropertyConfigurable- Returns:
- a collection of method names or an empty list
-
setPostConfigurationMethods
Description copied from interface:PropertyConfigurableSets the method names to be invoked after the properties have been set.- Specified by:
setPostConfigurationMethodsin interfacePropertyConfigurable- Parameters:
methodNames- the method names to invoke
-
setPostConfigurationMethods
Description copied from interface:PropertyConfigurableSets the method names to be invoked after the properties have been set.- Specified by:
setPostConfigurationMethodsin interfacePropertyConfigurable- Parameters:
methodNames- the method names to invoke
-
removePostConfigurationMethod
Description copied from interface:PropertyConfigurableRemoves the post configuration method.- Specified by:
removePostConfigurationMethodin interfacePropertyConfigurable- Parameters:
methodName- the method to remove- Returns:
trueif the method was removed, otherwisefalse
-
addPostConfigurationActions
protected final void addPostConfigurationActions() -
addPostConfigurationActions
private void addPostConfigurationActions(boolean replace) -
removePostConfigurationActions
-
getPropertyType
-
getConstructorPropertyType
-
getPropertySetter
-
getPropertyGetter
-