Top Description Fields Constructors Methods
org.jdom2.xpath.jaxen

pack-priv final Class NamespaceContainer

extends Object
Class Inheritance
Imports
org.jdom2.Element, .Namespace

XPath requires that the namespace nodes are linked to an Element. JDOM does not have such a relationship, so we improvise. Jaxen uses the identity equals ( == ) when comparing one 'node' to another, so we have to make sure that within the context of Jaxen we always return the same instances of NamespaceContainer each time. Further, for jaxen the instance of a Namespace for one Node cannot be the same instance of the same Namespace on a different Node...

This all also means that all Jaxen interaction is done with NamespaceContainer and not the JDOM Namespace, which in turn means that when Jaxen returns a NamespaceContainer node, it has to be unwrapped to a simple Namespace.

Author
rolf

Field Summary

Modifier and TypeField and Description
private final Element
private final Namespace

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Namespace
public Element
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

emtback to summary
private final Element emt
nsback to summary
private final Namespace ns

Constructor Detail

NamespaceContainerback to summary
public NamespaceContainer(Namespace ns, Element emt)

Method Detail

getNamespaceback to summary
public Namespace getNamespace()
getParentElementback to summary
public Element getParentElement()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override