org.makumba.analyser
Class AnalysableExpression
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.makumba.analyser.AnalysableElement
org.makumba.analyser.AnalysableExpression
- All Implemented Interfaces:
- Serializable, IterationTag, JspTag, Tag
- Direct Known Subclasses:
- CountFunctions, GenericListValueFunction
public abstract class AnalysableExpression
- extends AnalysableElement
An analysable EL expression, used for creating "implicit objects" as per EL definition (see
http://java.sun.com/products/jsp/2.1/docs/jsp-2_1-pfd2/javax/el/ELResolver.html) Implementations of this class can be
retrieved by ELResolver
-s in order to get status information, perform analysis-time tasks, etc.
- Version:
- $Id: AnalysableExpression.java,v 1.1 Jan 22, 2010 6:13:56 PM manu Exp $
- Author:
- Manuel Gay
- See Also:
- Serialized Form
Methods inherited from class org.makumba.analyser.AnalysableElement |
checkTagFound, discardJSPParsingData, getAnalyzedElementData, getCurrentBodyTagData, getElementAfter, getElementBefore, getPageCache, getPageCache, getRunningElementData, getTagByAttribute, getTagById, getThreadElementStack, initializeThread, keepAnalysisState, setAnalyzedElementData, setRunningElementData |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
doAfterBody, doEndTag, doStartTag, findAncestorWithClass, getId, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
elData
protected ELData elData
expression
protected String expression
parent
protected AnalysableTag parent
key
protected MultipleKey key
AnalysableExpression
public AnalysableExpression()
getElementData
public ElementData getElementData()
- Specified by:
getElementData
in class AnalysableElement
setELDataAtAnalysis
public void setELDataAtAnalysis(ELData ed)
- Sets the EL data and adapts the expression
treatELExpressionAtAnalysis
public void treatELExpressionAtAnalysis(String expression)
setParent
public void setParent(AnalysableTag parent)
getParent
public AnalysableTag getParent()
- Specified by:
getParent
in interface Tag
- Overrides:
getParent
in class TagSupport
setKey
public abstract void setKey(PageCache pageCache)
getKey
public MultipleKey getKey()
analyze
public abstract void analyze(PageCache pageCache)
- Performs analysis-time operations
- Parameters:
cache
- the PageCache
available to this expression
doEndAnalyze
public abstract void doEndAnalyze(PageCache pageCache)
treatExpressionAtAnalysis
public abstract String treatExpressionAtAnalysis(String expression)
- Modifies the expression before analysis. This is necessary because the expression that comes from page analysis
is not tailored to the specific expression we want to handle
- Returns:
- the expression value, trimmed down to what is necessary for this kind of EL expression evaluator
getPrefix
public abstract String getPrefix()
- Gets the prefix of the makumba EL expression, e.g. Value
- Returns:
- the prefix of this EL expression
resolve
public abstract Object resolve(PageContext pc,
PageCache pageCache)
throws LogicException
- Resolves the expression at runtime
- Parameters:
cache
- the PageCache
available to this expression
- Throws:
LogicException
findParentWithClass
protected Tag findParentWithClass(Class<?> clazz)
- Finds the first parent of this expression that is a tag of the specified type
- Returns:
- a parent
Tag
checkNumberOfArguments
protected void checkNumberOfArguments(int argumentCount)
throws ProgrammerError
- Checks that the function has the expected number of arguments. This should be enforced by the JSP compiler, but
an additional check can't hurt
- Throws:
ProgrammerError