uk.ac.starlink.ttools.votlint
Class ElementRef

java.lang.Object
  extended by uk.ac.starlink.ttools.votlint.ElementRef

public class ElementRef
extends Object

Provides a description of an element. This can be used at any time, unlike an ElementHandler, which is mostly unusable when it's not on the processing stack (i.e. after its SAX endElement has been processed).

Since:
7 Apr 2005
Author:
Mark Taylor (Starlink)

Constructor Summary
ElementRef(ElementHandler handler, Locator locator)
          Constructor.
 
Method Summary
 boolean equals(Object o)
           
 ElementHandler getHandler()
          Returns the element handler to which this ref refers.
 String getName()
          Returns the element name.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ElementRef

public ElementRef(ElementHandler handler,
                  Locator locator)
Constructor. This is called by ElementHandler itself - in general if you want an ElementRef you should use ElementHandler.getRef() rather than constructing a new one.

Parameters:
handler - handler
locator - locator describing the current parse position
Method Detail

getName

public String getName()
Returns the element name.

Returns:
name

getHandler

public ElementHandler getHandler()
Returns the element handler to which this ref refers. Note however that many of its methods may be useless if it's not in scope. In general this is only useful for recovering subclass-specific information stashed in the handler.

Returns:
handler

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.