|
TPTP 4.2.0 Platform Project Public API Specification |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
| Method Summary | |
|---|---|
CompiledExpressionEvaluator |
compile(java.lang.String expression,
java.lang.Object object,
boolean verifyExpression,
FastXPathContext fastXPathContext,
ICompilerContext compilationContext,
CompilerPostProcessor compilerPostProcessor,
ICompilerHelper cHelper)
|
CompiledExpressionEvaluator |
compile(java.lang.String expression,
java.lang.Object object,
ICompilerHelper cHelper)
Generates a Java expression equivalent to the XPath expression. |
ICompilerHelper |
createCompilerHelper(java.lang.Class targetClass)
|
java.lang.Object |
eval(java.lang.String expression,
java.lang.Object object)
Perform XPath query on an EObject. |
java.lang.Object |
evalCompiled(CompiledExpressionEvaluator evaluator,
java.lang.Object object)
Executes the compiled expression on EObject. |
java.util.Map |
getClassesAsByteArrays()
|
FastXPathClassGenerator |
getClassGenerator()
|
java.lang.Object |
getExpression(java.lang.String expression)
|
char[] |
getExpressionJavaSource(java.lang.String expression,
java.lang.Object object,
boolean verifyExpression,
FastXPathContext fastXPathContext,
ICompilerContext compilationContext,
CompilerPostProcessor compilerPostProcessor,
ICompilerHelper cHelper)
Generates the source code of a Java expression equivalent to the XPath expression. |
java.lang.Class |
getExtensionFunctionClass(java.lang.String key)
Returns the Class of the extension function |
FastXPathContextFactory |
getFastXPathContextFactory()
|
java.lang.String |
getVariable(java.lang.String key)
|
void |
registerFunctionClass(java.lang.Class functionClass,
java.lang.String key)
* Registers a Class that contains extension functions. |
void |
registerVariable(java.lang.String key,
java.lang.String newValue)
registers a new variable |
void |
resetDeclaredVariables()
Resets the declared variables map |
void |
resetExpressions()
Resets the known expressions cache |
java.lang.Object[] |
selectNodes(java.lang.String expression,
java.lang.Object object)
Perform XPath query on an EObject. |
void |
setFastXPathContextFactory(FastXPathContextFactory fastXPathContextFactory)
|
void |
unRegisterFunctionClass(java.lang.String key)
unregisters a registered extension function class |
void |
unRegisterVariable(java.lang.String key)
unregisters a variable |
| Method Detail |
public java.lang.Object[] selectNodes(java.lang.String expression,
java.lang.Object object)
throws javax.xml.transform.TransformerException,
ExpressionEvaluationException
expression - the XPath expression to evaluateobject - the EObject to be evaluated
javax.xml.transform.TransformerException
ExpressionEvaluationException
public java.lang.Object eval(java.lang.String expression,
java.lang.Object object)
throws javax.xml.transform.TransformerException,
ExpressionEvaluationException
expression - the XPath expression to evaluateobject - the EObject to be evaluated
javax.xml.transform.TransformerException
ExpressionEvaluationException
public java.lang.Object evalCompiled(CompiledExpressionEvaluator evaluator,
java.lang.Object object)
throws ExpressionEvaluationException
FastXPathEngine#compile(String, Object, CompilerHelper). It is
up to the user to cache the different CompiledExpressionEvaluators
evaluator - object - the EObject to be evaluated
ExpressionEvaluationException
public CompiledExpressionEvaluator compile(java.lang.String expression,
java.lang.Object object,
ICompilerHelper cHelper)
throws javax.xml.transform.TransformerException,
CodeGenerationError,
CompilerNotAvailableException
evalCompiled(CompiledExpressionEvaluator, Object)
expression - the XPath expression to generate code fromobject - The compiiler needs an instance of the type of Object that the
CompiledExpressionEvaluator will be specialized for.cHelper - A helper Class to configure the compilation process. Can be
null.
javax.xml.transform.TransformerException
CodeGenerationError
CompilerNotAvailableException
public CompiledExpressionEvaluator compile(java.lang.String expression,
java.lang.Object object,
boolean verifyExpression,
FastXPathContext fastXPathContext,
ICompilerContext compilationContext,
CompilerPostProcessor compilerPostProcessor,
ICompilerHelper cHelper)
throws javax.xml.transform.TransformerException,
CodeGenerationError,
CompilerNotAvailableException
javax.xml.transform.TransformerException
CodeGenerationError
CompilerNotAvailableException
public char[] getExpressionJavaSource(java.lang.String expression,
java.lang.Object object,
boolean verifyExpression,
FastXPathContext fastXPathContext,
ICompilerContext compilationContext,
CompilerPostProcessor compilerPostProcessor,
ICompilerHelper cHelper)
throws javax.xml.transform.TransformerException,
CodeGenerationError,
CompilerNotAvailableException
expression - the XPath expression to generate code fromobject - The compiler needs an instance of the type of Object that the
CompiledExpressionEvaluator will be specialized for.verifyExpression - If true the expression is evaluated to check if it is a valid
expression.fastXPathContext - If not null will be used otherwise a new one will be created.compilationContext - If not null will be used otherwise a new one will be created.compilerPostProcessor - If not null will be initialized and used otherwise a new one
will be created.
String that contains the Java body of the expresion.
javax.xml.transform.TransformerException
CodeGenerationError
CompilerNotAvailableExceptionpublic void resetExpressions()
public void resetDeclaredVariables()
public java.lang.String getVariable(java.lang.String key)
key - name of the variable to return
public void registerVariable(java.lang.String key,
java.lang.String newValue)
key - name of the variablenewValue - value of the variablepublic void unRegisterVariable(java.lang.String key)
key - name of the variablepublic java.lang.Class getExtensionFunctionClass(java.lang.String key)
key - the key by which the Class is registered
public void registerFunctionClass(java.lang.Class functionClass,
java.lang.String key)
functionClass - name of the classkey - the key it is registered by. The same key is used in the XPath
expressions referencing to this classpublic void unRegisterFunctionClass(java.lang.String key)
key - the key the class was registered as.
public java.lang.Object getExpression(java.lang.String expression)
throws javax.xml.transform.TransformerException
expression -
javax.xml.transform.TransformerExceptionpublic FastXPathContextFactory getFastXPathContextFactory()
fastXPathContextFactorypublic void setFastXPathContextFactory(FastXPathContextFactory fastXPathContextFactory)
public ICompilerHelper createCompilerHelper(java.lang.Class targetClass)
public java.util.Map getClassesAsByteArrays()
public FastXPathClassGenerator getClassGenerator()
throws CompilerNotAvailableException
CompilerNotAvailableException
|
TPTP 4.2.0 Platform Project Public API Specification |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||