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 String |
ACTION_CLASS_ATTRIBUTE |
static String |
CLASS_ATTRIBUTE |
static String |
FILE_ATTRIBUTE |
static String |
KEY_ATTRIBUTE |
static String |
NAME_ATTRIBUTE |
static String |
PATTERN_ATTRIBUTE |
static String |
SCOPE_ATTRIBUTE |
static String |
VALUE_ATTRIBUTE |
context| Constructor and Description |
|---|
Action() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
begin(InterpretationContext ic,
String name,
Attributes attributes)
Called when the parser encounters an element matching a
Pattern. |
void |
body(InterpretationContext ic,
String body)
Called to pass the body (as text) contained within an element.
|
abstract void |
end(InterpretationContext ic,
String name) |
protected int |
getColumnNumber(InterpretationContext ic) |
protected String |
getLineColStr(InterpretationContext ic) |
protected int |
getLineNumber(InterpretationContext ic) |
String |
toString() |
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContextpublic static final String NAME_ATTRIBUTE
public static final String KEY_ATTRIBUTE
public static final String VALUE_ATTRIBUTE
public static final String FILE_ATTRIBUTE
public static final String CLASS_ATTRIBUTE
public static final String PATTERN_ATTRIBUTE
public static final String SCOPE_ATTRIBUTE
public static final String ACTION_CLASS_ATTRIBUTE
public abstract void begin(InterpretationContext ic, String name, Attributes attributes) throws ActionException
Pattern.ic - interpretation contextname - name of actionattributes - attributes of actionActionException - failed to process actionpublic void body(InterpretationContext ic, String body) throws ActionException
ic - interpretation contextbody - text of the elementActionException - the body could not be parsedpublic abstract void end(InterpretationContext ic, String name) throws ActionException
ActionExceptionprotected int getColumnNumber(InterpretationContext ic)
protected int getLineNumber(InterpretationContext ic)
protected String getLineColStr(InterpretationContext ic)
Copyright © 2005–2014 QOS.ch. All rights reserved.