public abstract class Action extends ContextAwareBase
Action methods are invoked as the XML file is parsed.
This class is largely inspired from the relevant class in the commons-digester project of the Apache Software Foundation.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACTION_CLASS_ATTRIBUTE |
static java.lang.String |
CLASS_ATTRIBUTE |
static java.lang.String |
FILE_ATTRIBUTE |
static java.lang.String |
KEY_ATTRIBUTE |
static java.lang.String |
NAME_ATTRIBUTE |
static java.lang.String |
PATTERN_ATTRIBUTE |
static java.lang.String |
SCOPE_ATTRIBUTE |
static java.lang.String |
VALUE_ATTRIBUTE |
context
Constructor and Description |
---|
Action() |
Modifier and Type | Method and Description |
---|---|
abstract void |
begin(InterpretationContext ic,
java.lang.String name,
org.xml.sax.Attributes attributes)
Called when the parser encounters an element matching a
Pattern . |
void |
body(InterpretationContext ic,
java.lang.String body)
Called to pass the body (as text) contained within an element.
|
abstract void |
end(InterpretationContext ic,
java.lang.String name) |
protected int |
getColumnNumber(InterpretationContext ic) |
protected java.lang.String |
getLineColStr(InterpretationContext ic) |
protected int |
getLineNumber(InterpretationContext ic) |
java.lang.String |
toString() |
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
public static final java.lang.String NAME_ATTRIBUTE
public static final java.lang.String KEY_ATTRIBUTE
public static final java.lang.String VALUE_ATTRIBUTE
public static final java.lang.String FILE_ATTRIBUTE
public static final java.lang.String CLASS_ATTRIBUTE
public static final java.lang.String PATTERN_ATTRIBUTE
public static final java.lang.String SCOPE_ATTRIBUTE
public static final java.lang.String ACTION_CLASS_ATTRIBUTE
public abstract void begin(InterpretationContext ic, java.lang.String name, org.xml.sax.Attributes attributes) throws ActionException
Pattern
.ActionException
public void body(InterpretationContext ic, java.lang.String body) throws ActionException
ic
- body
- ActionException
public abstract void end(InterpretationContext ic, java.lang.String name) throws ActionException
ActionException
public java.lang.String toString()
toString
in class java.lang.Object
protected int getColumnNumber(InterpretationContext ic)
protected int getLineNumber(InterpretationContext ic)
protected java.lang.String getLineColStr(InterpretationContext ic)
Copyright © 1999-2017 QOS.ch. All rights reserved