Package org.simpleframework.xml.core
Class Qualifier
java.lang.Object
org.simpleframework.xml.core.Qualifier
- All Implemented Interfaces:
Decorator
The
Qualifier
object is used to provide decorations
to an output node for namespaces. This will scan a provided
contact object for namespace annotations. If any are found they
can then be used to apply these namespaces to the provided node.
The Contact
objects can represent fields or methods
that have been annotated with XML annotations.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate NamespaceDecorator
This is the namespace decorator that is populated for use. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
decorate
(OutputNode node) This method is used to decorate the provided node.void
decorate
(OutputNode node, Decorator secondary) This method is used to decorate the provided node.private void
This is use to scan forNamespace
annotations on the contact.private void
This method is used to scan theContact
provided to determine if there are any namespace annotations.private void
This is use to scan forNamespaceList
annotations on the contact.
-
Field Details
-
decorator
This is the namespace decorator that is populated for use.
-
-
Constructor Details
-
Qualifier
Constructor for theQualifier
object. This is used to create a decorator that will scan the provided contact forNamespace
annotations. These can then be applied to the output node to provide qualification.- Parameters:
contact
- this is the contact to be scanned
-
-
Method Details
-
decorate
This method is used to decorate the provided node. This node can be either an XML element or an attribute. Decorations that can be applied to the node by invoking this method include things like namespaces and namespace lists. -
decorate
This method is used to decorate the provided node. This node can be either an XML element or an attribute. Decorations that can be applied to the node by invoking this method include things like namespaces and namespace lists. This can also be given anotherDecorator
which is applied before this decorator, any common data can then be overwritten. -
scan
This method is used to scan theContact
provided to determine if there are any namespace annotations. If there are any annotations then these are added to the internal namespace decorator. This ensues that they can be applied to the node when that node requests decoration.- Parameters:
contact
- this is the contact to be scanned for namespaces
-
namespace
This is use to scan forNamespace
annotations on the contact. Once a namespace has been located then it is used to populate the internal namespace decorator. This can then be used to decorate any output node that requires it.- Parameters:
contact
- this is the contact to scan for namespaces
-
scope
This is use to scan forNamespaceList
annotations on the contact. Once a namespace list has been located then it is used to populate the internal namespace decorator. This can then be used to decorate any output node that requires it.- Parameters:
contact
- this is the contact to scan for namespace lists
-