public interface EquationCompiler
Module: equations-api
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>equations-api</artifactId> </dependency>
Modifier and Type | Method and Description |
---|---|
boolean |
compile(String equation,
Map<String,Class<?>> variableNameToTypeMap)
Compiles a string to byte code plus some metadata as encapsulated by the
Equation class |
Equation |
getEquation()
If compile() returns true, this returns the result of the compilation.
|
Equation |
getErrorEquation(String equation,
Class<?> type,
String errorMessage)
A factory method that returns an Equation that always fails at runtime.
|
String |
getLastErrorMsg()
Returns an error message for an error encountered during a call to compile, if any.
|
EquationParser |
getParser()
Returns the parser which can be used for checking the syntax of equations.
|
boolean compile(String equation, Map<String,Class<?>> variableNameToTypeMap)
Equation
classequation
- a textual representation of an equationvariableNameToTypeMap
- a mapping from variable names occurring in "equation" to their respective typesString getLastErrorMsg()
Equation getEquation()
Equation
representing the code compiled from the string passed into compile()Equation getErrorEquation(String equation, Class<?> type, String errorMessage)
equation
- an arbitrary string that is usually a syntactically invalid equationtype
- the return type of the error equationerrorMessage
- the runtime error message that the returned equation will produceEquationParser getParser()
Copyright 2011-2015 Cytoscape Consortium. All rights reserved.