Package org.simpleframework.xml.core
Class Qualifier
- java.lang.Object
-
- org.simpleframework.xml.core.Qualifier
-
- All Implemented Interfaces:
Decorator
class Qualifier extends java.lang.Object implements Decorator
TheQualifier
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. TheContact
objects can represent fields or methods that have been annotated with XML annotations.
-
-
Field Summary
Fields Modifier and Type Field Description private NamespaceDecorator
decorator
This is the namespace decorator that is populated for use.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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
namespace(Contact contact)
This is use to scan forNamespace
annotations on the contact.private void
scan(Contact contact)
This method is used to scan theContact
provided to determine if there are any namespace annotations.private void
scope(Contact contact)
This is use to scan forNamespaceList
annotations on the contact.
-
-
-
Field Detail
-
decorator
private NamespaceDecorator decorator
This is the namespace decorator that is populated for use.
-
-
Constructor Detail
-
Qualifier
public Qualifier(Contact contact)
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 Detail
-
decorate
public void decorate(OutputNode node)
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
public void decorate(OutputNode node, Decorator secondary)
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
private void scan(Contact contact)
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
private void namespace(Contact contact)
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
private void scope(Contact contact)
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
-
-