Package org.apache.harmony.xml.dom
Class DOMConfigurationImpl
java.lang.Object
org.apache.harmony.xml.dom.DOMConfigurationImpl
- All Implemented Interfaces:
DOMConfiguration
public final class DOMConfigurationImpl extends Object implements DOMConfiguration
A minimal implementation of DOMConfiguration. This implementation uses inner
parameter instances to centralize each parameter's behavior.
-
Constructor Summary
Constructors Constructor Description DOMConfigurationImpl() -
Method Summary
Modifier and Type Method Description booleancanSetParameter(String name, Object value)Check if setting a parameter to a specific value is supported.ObjectgetParameter(String name)Return the value of a parameter if known.DOMStringListgetParameterNames()The list of the parameters supported by thisDOMConfigurationobject and for which at least one value can be set by the application.voidnormalize(Node node)voidsetParameter(String name, Object value)Set the value of a parameter.
-
Constructor Details
-
DOMConfigurationImpl
public DOMConfigurationImpl()
-
-
Method Details
-
canSetParameter
Description copied from interface:DOMConfigurationCheck if setting a parameter to a specific value is supported.- Specified by:
canSetParameterin interfaceDOMConfiguration- Parameters:
name- The name of the parameter to check.value- An object. ifnull, the returned value istrue.- Returns:
trueif the parameter could be successfully set to the specified value, orfalseif the parameter is not recognized or the requested value is not supported. This does not change the current value of the parameter itself.
-
setParameter
Description copied from interface:DOMConfigurationSet the value of a parameter.- Specified by:
setParameterin interfaceDOMConfiguration- Parameters:
name- The name of the parameter to set.value- The new value ornullif the user wishes to unset the parameter. While the type of the value parameter is defined asDOMUserData, the object type must match the type defined by the definition of the parameter. For example, if the parameter is "error-handler", the value must be of typeDOMErrorHandler.- Throws:
DOMException- NOT_FOUND_ERR: Raised when the parameter name is not recognized.
NOT_SUPPORTED_ERR: Raised when the parameter name is recognized but the requested value cannot be set.
TYPE_MISMATCH_ERR: Raised if the value type for this parameter name is incompatible with the expected value type.
-
getParameter
Description copied from interface:DOMConfigurationReturn the value of a parameter if known.- Specified by:
getParameterin interfaceDOMConfiguration- Parameters:
name- The name of the parameter.- Returns:
- The current object associated with the specified parameter or
nullif no object has been associated or if the parameter is not supported. - Throws:
DOMException- NOT_FOUND_ERR: Raised when the parameter name is not recognized.
-
getParameterNames
Description copied from interface:DOMConfigurationThe list of the parameters supported by thisDOMConfigurationobject and for which at least one value can be set by the application. Note that this list can also contain parameter names defined outside this specification.- Specified by:
getParameterNamesin interfaceDOMConfiguration
-
normalize
-