java.lang.Object
javax.ide.extension.ElementVisitor
- Direct Known Subclasses:
- BooleanVisitor, ExtensionHook, I18NCharVisitor, I18NStringVisitor, IconVisitor, MetaClassVisitor
- public abstract class ElementVisitor
- extends java.lang.Object
ElementVisitor is responsible for visiting elements in an XML file
processed by an XML parser used by a JSR-198 compatible IDE.
Implementations of this class usually provide an implementation for the
start() and end() methods.
|
Field Summary |
static java.lang.String |
KEY_LOCATOR
A key that provides information about the position in the manifest file
currently being processed. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KEY_LOCATOR
public static final java.lang.String KEY_LOCATOR
- A key that provides information about the position in the manifest file
currently being processed. In the scope data map, this key will resolve
to an instance of org.xml.sax.Locator, if the parser supports it.
You should always check whether the locator is null, since it is not
required that every IDE provide a Locator in the parsing context.
- See Also:
- Constant Field Values
ElementVisitor
public ElementVisitor()
log
protected final void log(ElementContext context,
java.util.logging.Level level,
java.lang.String msg)
- Log a message. This is the recommended way to log errors while processing
elements in the manifest file. It will ensure that positional information
(if available) is passed to the logger as the first parameter of the
log message.
start
public void start(ElementStartContext context)
- Visit the start tag of an xml element.
This implementation does nothing.
end
public void end(ElementEndContext context)
- Visit the end tag of an xml element.
This implementation does nothing.