Class Qualifier

java.lang.Object
org.simpleframework.xml.core.Qualifier
All Implemented Interfaces:
Decorator

class Qualifier extends Object implements 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

    Fields
    Modifier and Type
    Field
    Description
    This is the namespace decorator that is populated for use.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Qualifier(Contact contact)
    Constructor for the Qualifier object.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    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 for Namespace annotations on the contact.
    private void
    scan(Contact contact)
    This method is used to scan the Contact provided to determine if there are any namespace annotations.
    private void
    scope(Contact contact)
    This is use to scan for NamespaceList annotations on the contact.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • decorator

      private NamespaceDecorator decorator
      This is the namespace decorator that is populated for use.
  • Constructor Details

    • Qualifier

      public Qualifier(Contact contact)
      Constructor for the Qualifier object. This is used to create a decorator that will scan the provided contact for Namespace 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

      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.
      Specified by:
      decorate in interface Decorator
      Parameters:
      node - this is the node that is to be decorated by this
    • 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 another Decorator which is applied before this decorator, any common data can then be overwritten.
      Specified by:
      decorate in interface Decorator
      Parameters:
      node - this is the node that is to be decorated by this
      secondary - this is a secondary decorator to be applied
    • scan

      private void scan(Contact contact)
      This method is used to scan the Contact 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 for Namespace 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 for NamespaceList 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