|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttom.library.sl.AbstractStrategy
tom.library.sl.AbstractStrategyBasic
public abstract class AbstractStrategyBasic
Partial implementation of the strategy interface that can be used to
implement new basic transformations (like a rewrite rule system). This class
has an attribute of type Strategy which corresponds to the default strategy
if the transformation system cannot be applied. Note that this abstract
class is used to compile the %strategy
Tom instruction.
Field Summary | |
---|---|
protected Strategy |
any
Default strategy |
Fields inherited from class tom.library.sl.AbstractStrategy |
---|
environment |
Constructor Summary | |
---|---|
AbstractStrategyBasic(Strategy v)
|
Method Summary | |
---|---|
Visitable |
getChildAt(int i)
Returns the child at the specified position |
int |
getChildCount()
Returns the number of children of the current Visitable |
Visitable[] |
getChildren()
Returns the list of (non builtin) Visitable children |
Visitable |
setChildAt(int i,
Visitable child)
Replaces a child at the specified position |
Visitable |
setChildren(Visitable[] children)
Replaces all children of any visitable at once, and returns this visitable. |
int |
visit(Introspector introspector)
Visit the current subject (found in the environment) and place its result in the environment. |
Methods inherited from class tom.library.sl.AbstractStrategy |
---|
getAncestor, getEnvironment, getPosition, getRoot, getSubject, init, init, setEnvironment, setRoot, setSubject, visit, visit, visit, visit, visitLight |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface tom.library.sl.Strategy |
---|
visitLight |
Field Detail |
---|
protected Strategy any
Constructor Detail |
---|
public AbstractStrategyBasic(Strategy v)
Method Detail |
---|
public int visit(Introspector introspector)
Strategy
introspector
- the introspectorpublic int getChildCount()
Visitable
public Visitable getChildAt(int i)
Visitable
i
- index of the element to return
public Visitable setChildAt(int i, Visitable child)
Visitable
i
- index of the element to returnchild
- element to set up
public Visitable[] getChildren()
Visitable
public Visitable setChildren(Visitable[] children)
Visitable
children
- array of children to set up
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |