|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jdom.output.NamespaceStack | +--org.jdom.output.XMLOutputter.NamespaceStack
Our own null subclass of NamespaceStack. This plays a little trick with Java access protection. We want subclasses of XMLOutputter to be able to override protected methods that declare a NamespaceStack parameter, but we don't want to declare the parent NamespaceStack class as public.
Constructor Summary | |
protected |
XMLOutputter.NamespaceStack()
|
Method Summary | |
java.lang.String |
getURI(java.lang.String prefix)
Given a prefix, this will return the namespace URI most rencently (topmost) associated with that prefix. |
java.lang.String |
pop()
This will remove the topmost (most recently added) , and return its prefix. |
void |
push(Namespace ns)
This will add a new
to those currently available. |
int |
size()
This returns the number of available namespaces. |
java.lang.String |
toString()
This will print out the size and current stack, from the most recently added to
the "oldest," all to System.out . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
protected XMLOutputter.NamespaceStack()
Method Detail |
public void push(Namespace ns)
This will add a new
to those currently available.
Namespace
ns
- Namespace
to add.public java.lang.String pop()
This will remove the topmost (most recently added)
, and return its prefix.
Namespace
String
- the popped namespace prefix.public int size()
This returns the number of available namespaces.
int
- size of the namespace stack.public java.lang.String getURI(java.lang.String prefix)
Given a prefix, this will return the namespace URI most rencently (topmost) associated with that prefix.
prefix
- String
namespace prefix.String
- the namespace URI for that prefix.public java.lang.String toString()
This will print out the size and current stack, from the
most recently added
to
the "oldest," all to Namespace
System.out
.
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |