tom.library.sl
Interface Introspector

All Known Implementing Classes:
VisitableIntrospector

public interface Introspector


Method Summary
 Object getChildAt(Object o, int i)
          Return the i-th subterm of the object o
 int getChildCount(Object o)
          Return the number of subterms of the object o
 Object[] getChildren(Object o)
          Return the children of a given object
<T> T
setChildAt(T o, int i, Object child)
          Replace the i-th subterm of the object o by child
<T> T
setChildren(T o, Object[] children)
          Replace all children of a given object, and return the new object
 

Method Detail

setChildren

<T> T setChildren(T o,
                  Object[] children)
Replace all children of a given object, and return the new object

Parameters:
o - the object whose children are replace
children - the new subterm of the object

getChildren

Object[] getChildren(Object o)
Return the children of a given object

Parameters:
o - the subject

setChildAt

<T> T setChildAt(T o,
                 int i,
                 Object child)
Replace the i-th subterm of the object o by child

Parameters:
o - the subject
i - the index of the subterm
child - the new subterm

getChildAt

Object getChildAt(Object o,
                  int i)
Return the i-th subterm of the object o

Parameters:
o - the subject
i - the index of the subterm (0<=i<=childCount)

getChildCount

int getChildCount(Object o)
Return the number of subterms of the object o

Parameters:
o - the subject
Returns:
the number of children