| java.lang.Object de.uka.ilkd.key.java.SourceData
SourceData | public class SourceData (Code) | | This class keeps track of the next element to match, which is provided by
calling method
SourceData.getSource() . The rough idea is to store the parent ast
node and the index of the child which has to be matched (for convenience reasons
-1 encodes that the parent node itself has to be matched).
This kind of wrapping is useful when matching list schemavariables.
|
SourceData | public SourceData(ProgramElement element, int childPos, Services services)(Code) | | creates a new source data object with parent node element whose
childPos-th child has to be matched (-1 denotes element itself
has to be matched
Parameters: element - the ProgramElement Parameters: childPos - the int giving the index of the child of element to be matched Parameters: services - the Services |
getChildPos | public int getChildPos()(Code) | | returns index of the child to be matched
an int which is -1 if @link #getElement() has to be matched itself otherwise it refers to the index of the child of element to be matched |
getServices | public Services getServices()(Code) | | returns the services object
the services object |
getSource | public ProgramElement getSource()(Code) | | returns the element to be matched, i.e. if @link #getChildPos() is -1
it returns @link #getElement()
otherwise it returns the getChildPos()-th child or null if the returned
child position is out of bound.
the ProgramElement to be matched next or null if there is no such element |
next | public void next()(Code) | | increments the child position by one, this means moving on to the next sibling
(or the first child if childPos has been -1 before
|
setChildPos | public void setChildPos(int childPos)(Code) | | sets the index of the child to be matched
Parameters: childPos - the int with the new index |
setElement | public void setElement(ProgramElement element)(Code) | | sets the parent node
Parameters: element - the ProgramElement used as new parent node |
|
|