public abstract class ElementVisitor
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
ElementVisitor.ResourceBundleProvider
A class that creates the ResourceBundle instance.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
KEY_LOCATOR
A key that provides information about the position in the manifest file
currently being processed.
|
Constructor and Description |
---|
ElementVisitor() |
Modifier and Type | Method and Description |
---|---|
void |
end(ElementEndContext context)
Visit the end tag of an xml element.
|
protected java.lang.String |
getAttributeHelper(ElementStartContext context,
java.lang.String attributeName,
boolean trim,
boolean logErrorIfMissing) |
static java.lang.ClassLoader |
getClassLoader(ElementContext context)
Gets the class loader to use in the specified context.
|
protected java.lang.ClassLoader |
getMetaClassLoader(ElementContext context) |
static java.util.ResourceBundle |
getResourceBundle(ElementContext context)
Gets the resource bundle (if any) to be used for translatable resources
in the specified context.
|
static ElementVisitor.ResourceBundleProvider |
getResourceBundleProvider() |
protected java.lang.String |
getTextHelper(ElementEndContext context,
boolean trim,
boolean logErrorIfMissing) |
protected void |
log(ElementContext context,
java.util.logging.Level level,
java.lang.String msg)
Log a message.
|
protected void |
log(ElementContext context,
java.util.logging.Level level,
java.lang.String msg,
java.lang.Object... parameters)
Log a message.
|
static void |
setResourceBundleProvider(ElementVisitor.ResourceBundleProvider resBundleProvider) |
void |
start(ElementStartContext context)
Visit the start tag of an xml element.
|
public static final java.lang.String KEY_LOCATOR
You should always check whether the locator is null, since it is not required that every IDE provide a Locator in the parsing context.
protected final void log(ElementContext context, java.util.logging.Level level, java.lang.String msg)
context
- the current context.level
- the level to log at.msg
- the message to log.protected final void log(ElementContext context, java.util.logging.Level level, java.lang.String msg, java.lang.Object... parameters)
context
- the current context.level
- the level to log at.msg
- the message to log.parameters
- one or more parameters for the message.public void start(ElementStartContext context)
This implementation does nothing.
context
- information about the xml start tag.public void end(ElementEndContext context)
This implementation does nothing.
context
- information about the xml end tag.public static final java.lang.ClassLoader getClassLoader(ElementContext context)
context
- the context.public static final java.util.ResourceBundle getResourceBundle(ElementContext context)
context
- a processing context.protected java.lang.String getAttributeHelper(ElementStartContext context, java.lang.String attributeName, boolean trim, boolean logErrorIfMissing)
protected java.lang.String getTextHelper(ElementEndContext context, boolean trim, boolean logErrorIfMissing)
public static void setResourceBundleProvider(ElementVisitor.ResourceBundleProvider resBundleProvider)
public static ElementVisitor.ResourceBundleProvider getResourceBundleProvider()
protected java.lang.ClassLoader getMetaClassLoader(ElementContext context)