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 NamespaceDecoratorThis is the namespace decorator that is populated for use. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddecorate(OutputNode node) This method is used to decorate the provided node.voiddecorate(OutputNode node, Decorator secondary) This method is used to decorate the provided node.private voidThis is use to scan forNamespaceannotations on the contact.private voidThis method is used to scan theContactprovided to determine if there are any namespace annotations.private voidThis is use to scan forNamespaceListannotations on the contact.
-
Field Details
-
decorator
This is the namespace decorator that is populated for use.
-
-
Constructor Details
-
Qualifier
Constructor for theQualifierobject. This is used to create a decorator that will scan the provided contact forNamespaceannotations. 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 anotherDecoratorwhich is applied before this decorator, any common data can then be overwritten. -
scan
This method is used to scan theContactprovided 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 forNamespaceannotations 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 forNamespaceListannotations 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
-