public class BTFunctionClause extends AbstractClause implements SubClause
ClauseFactory| Modifier and Type | Field and Description |
|---|---|
protected BTFunction |
function |
protected Clause |
parent |
protected BaseType |
value |
children, constant, defined| Modifier | Constructor and Description |
|---|---|
protected |
BTFunctionClause(BTFunction function,
java.util.List children)
Creates a new BTFunctionClause.
|
| Modifier and Type | Method and Description |
|---|---|
BaseType |
evaluate()
Evaluates the clause, first calling evaluate() on any sub-clauses it
contains.
|
BTFunction |
getFunction()
Returns the server-side function invoked by this clause
|
Clause |
getParent()
Returns the Clause which contains this subclause.
|
BaseType |
getValue()
Returns a BaseType containing the current value of the sub-clause.
|
void |
printConstraint(java.io.PrintWriter os)
Prints the original string representation of this clause.
|
void |
setParent(Clause parent)
Sets the parent of this subclause.
|
getChildren, isConstant, isDefinedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetChildren, isConstant, isDefinedprotected Clause parent
protected BTFunction function
protected BaseType value
protected BTFunctionClause(BTFunction function, java.util.List children) throws DAP2ServerSideException
function - The function invoked by the clausechildren - A list of SubClauses, to be given as arguments
to the function. If all the arguments are constant, the function
clause will be flagged as constant, and evaluated immediately.DAP2ServerSideException - Thrown if either 1) the function does not
accept the arguments given, or 2) the
clause is constant, and the attempt to evaluate it fails.public Clause getParent()
SubClausepublic BaseType getValue()
SubClausepublic BaseType evaluate() throws DAP2ServerSideException
SubClauseevaluate in interface SubClauseDAP2ServerSideException - Thrown if the evaluation fails for any reason.public void setParent(Clause parent)
SubClausepublic BTFunction getFunction()
public void printConstraint(java.io.PrintWriter os)
printConstraint in interface Clause