|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--saffron.opt.Operand
An Operand
determines whether a Rule
can be
applied to a particular expression.
For example, the rule to pull a filter up from the left side of a
join takes operands: (Join (Filter) (Any))
.
Note that children
means different things if it is empty
or it is null
: (Join (Filter ()) (Any))
means that, to match the rule, Filter
must have no
operands.
Field Summary | |
private Operand[] |
children
|
private Class |
clazz
|
private CallingConvention |
convention
|
(package private) static Operand[] |
noOperands
|
(package private) int |
ordinalInParent
|
(package private) int |
ordinalInRule
|
(package private) Operand |
parent
|
(package private) Rule |
rule
|
(package private) int[] |
solveOrder
|
Constructor Summary | |
Operand(Class clazz,
CallingConvention convention,
Operand[] children)
Creates an operand which matches any CallingConvention . |
|
Operand(Class clazz,
Operand[] children)
Creates an operand which matches any CallingConvention . |
Method Summary | |
Object[] |
getChildren()
returns an array of the object's children. |
boolean |
matches(Rel rel)
Returns whether a relational expression matches this operand. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private final Class clazz
private final CallingConvention convention
private final Operand[] children
Operand parent
int ordinalInParent
Rule rule
int ordinalInRule
int[] solveOrder
static final Operand[] noOperands
Constructor Detail |
public Operand(Class clazz, Operand[] children)
CallingConvention
.
public Operand(Class clazz, CallingConvention convention, Operand[] children)
CallingConvention
.
Method Detail |
public Object[] getChildren()
Walkable
getChildren
in interface Walkable
public boolean matches(Rel rel)
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |