|
ESC/Java2 © 2003,2004,2005 David Cok and Joseph Kiniry © 2005 UCD Dublin © 2003,2004 Radboud University Nijmegen © 1999,2000 Compaq Computer Corporation © 1997,1998,1999 Digital Equipment Corporation All Rights Reserved |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectescjava.translate.Frame.ModifiesIterator
This class enables iterating over the set of store-ref locations in a ModifiesGroupPragma. It also has the ability to include in the iteration the contents of datagroups that are part of the set of store-ref locations.
Field Summary | |
private java.util.List |
done
The datagroups that have already been expanded |
private boolean |
expandDatagroups
If true, then datagroups are expanded and their contents made part of the iteration. |
private boolean |
expandWild
If true, then field wild card store refs (obj.* and Type.*) are expanded and their contents made part of the iteration. |
private int |
i
An array index into mp |
private int |
limit
The maximum number of times to unroll a maps reference. |
private CondExprModifierPragmaVec |
mp
The set of store-ref locations over which to iterate. |
private java.util.List |
others
Fields that have yet to be iterated over. |
private TypeDecl |
td
The TypeDecl whose view of any datagroups is to be used. |
Constructor Summary | |
Frame.ModifiesIterator(TypeDecl td,
CondExprModifierPragmaVec mp,
boolean expandDatagroups)
Creates an iterator over the store-ref locations in the CondExprModifierPragmaVec. |
|
Frame.ModifiesIterator(TypeDecl td,
CondExprModifierPragmaVec mp,
boolean expandDatagroups,
boolean expandWild)
Creates an iterator over the store-ref locations in the CondExprModifierPragmaVec. |
Method Summary | |
private void |
add(ObjectDesignator od,
FieldDecl d)
Adds the contents of the datagroup d (of object od, which may not be null) to the 'others' list. |
private void |
addFields(ObjectDesignator od)
Adds all the fields of the od (whether it is a type or an object) into the 'others' list as FieldAccess items. |
private int |
count(FieldDecl d)
Returns the number of times the argument is in the 'done' list |
boolean |
hasNext()
Returns true if there is more to the iteration |
java.lang.Object |
next()
Returns the next element of the iteration; only valid if hasNext returns true, otherwise throws an exception |
void |
reset()
Resets the iteration back to the beginning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private final TypeDecl td
private final CondExprModifierPragmaVec mp
private final java.util.List others
private final java.util.List done
private final boolean expandDatagroups
private final boolean expandWild
private int i
private int limit
Constructor Detail |
public Frame.ModifiesIterator(TypeDecl td, CondExprModifierPragmaVec mp, boolean expandDatagroups)
mp
- The set of store-ref locations over which to
iterateexpandDatagroups
- if true, then datagroups are
expanded and their contents (recursively) become
steps in the iterationpublic Frame.ModifiesIterator(TypeDecl td, CondExprModifierPragmaVec mp, boolean expandDatagroups, boolean expandWild)
mp
- The set of store-ref locations over which to
iterateexpandDatagroups
- if true, then datagroups are
expanded and their contents (recursively) become
steps in the iterationexpandWild
- if true, then store-ref expressions
of the form obj.* are expanded into their
individual fieldsMethod Detail |
public void reset()
public boolean hasNext()
public java.lang.Object next() throws java.util.NoSuchElementException
java.util.NoSuchElementException
- if there are no more elements
in the iterationprivate void addFields(ObjectDesignator od)
od
- private void add(ObjectDesignator od, FieldDecl d)
od
- Object referenced
- Declaration of the datagroupprivate int count(FieldDecl d)
d
- Object to be checked
|
ESC/Java2 © 2003,2004,2005 David Cok and Joseph Kiniry © 2005 UCD Dublin © 2003,2004 Radboud University Nijmegen © 1999,2000 Compaq Computer Corporation © 1997,1998,1999 Digital Equipment Corporation All Rights Reserved |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |