|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface BOp
An operator, such as a constant, variable, join, sort, filter, etc. Abstract operations, such as the AST, are also described with this data structure.
Operators are organized in a tree of operators. The arity of an operator is the number of child operands declared by that operator class. The children of an operator are themselves operators. Parents reference their children, but back references to the parents are not maintained.
In addition to their arguments, operators may have a variety of annotations, including those specific to an operator (such as the maximum number of iterators for a closure operator), those shared by many operators (such as set of variables which are selected by a join or distributed hash table), or those shared by all operators (such as a cost model).
| Nested Class Summary | |
|---|---|
static interface |
BOp.Annotations
Interface declaring well known annotations. |
| Field Summary | |
|---|---|
static Map<String,Object> |
NOANNS
An empty immutable annotations map. |
static BOp[] |
NOARGS
An empty array. |
| Method Summary | ||
|---|---|---|
Map<String,Object> |
annotations()
The operator's annotations. |
|
Iterator<BOp> |
argIterator()
An iterator visiting the operator's arguments. |
|
List<BOp> |
args()
The operator's arguments as list. |
|
int |
arity()
The #of arguments to the operation. |
|
BOp |
clone()
Deep copy clone of the operator. |
|
BOp |
get(int index)
Return an argument to the operation. |
|
BOpEvaluationContext |
getEvaluationContext()
Return the evaluation context for the operator as specified by BOp.Annotations.EVALUATION_CONTEXT. |
|
int |
getId()
Return the BOp.Annotations.BOP_ID. |
|
|
getProperty(String name,
T defaultValue)
Return the value of the named annotation. |
|
Object |
getRequiredProperty(String name)
Return the value of the named annotation. |
|
boolean |
isController()
Return true iff this operator is a controller. |
|
BOp |
setProperty(String name,
Object value)
Unconditionally sets the property. |
|
BOp[] |
toArray()
A shallow copy of the operator's arguments. |
|
|
toArray(T[] a)
A shallow copy of the operator's arguments using the generic type of the caller's array. |
|
String |
toShortString()
Return a short (non-recursive) representation of the BOp. |
|
String |
toString()
Return a |
|
| Methods inherited from interface cutthecrap.utils.striterators.IPropertySet |
|---|
getProperty |
| Field Detail |
|---|
static final BOp[] NOARGS
static final Map<String,Object> NOANNS
| Method Detail |
|---|
int arity()
BOp get(int index)
index - The argument index in [0:arity()-1].
List<BOp> args()
Iterator<BOp> argIterator()
BOp[] toArray()
<T> T[] toArray(T[] a)
null is appended to mark the end of the data.
Map<String,Object> annotations()
<T> T getProperty(String name,
T defaultValue)
T - The generic type of the annotation value.name - The name of the annotation.defaultValue - The default value.
BOp setProperty(String name,
Object value)
name - The name.value - The value.
BOp on which the property has been set.Object getRequiredProperty(String name)
name - The name of the annotation.
IllegalStateException - if the named annotation is not bound.http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6302954BOp clone()
String toShortString()
BOp.
String toString()
toString in class Objectint getId()
BOp.Annotations.BOP_ID.
IllegalStateException - if that annotation is not bound.BOpEvaluationContext getEvaluationContext()
BOp.Annotations.EVALUATION_CONTEXT.
boolean isController()
true iff this operator is a controller.
BOp.Annotations.CONTROLLER
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||