com.sun.tools.javac.comp
public class: Todo [javadoc |
source]
java.lang.Object
java.util.AbstractCollection
java.util.AbstractQueue<AttrContext>
com.sun.tools.javac.comp.Todo
All Implemented Interfaces:
Queue, Collection
Direct Known Subclasses:
JavadocTodo
A queue of all as yet unattributed classes.
This is NOT part of any supported API.
If you write code that depends on this, you do so at your own risk.
This code and its internal interfaces are subject to change or
deletion without notice.
Field Summary |
---|
protected static final Key<Todo> | todoKey | The context key for the todo list. |
LinkedList<AttrContext> | contents | |
LinkedList<AttrContext> | contentsByFile | |
Map<JavaFileObject, FileQueue> | fileMap | |
Methods from java.util.AbstractCollection: |
---|
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, toString |
Methods from java.lang.Object: |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method from com.sun.tools.javac.comp.Todo Detail: |
public void append(Env<AttrContext> env) {
add(env);
}
|
public Queue<AttrContext> groupByFile() {
if (contentsByFile == null) {
contentsByFile = new LinkedList< Queue< Env< AttrContext > > >();
for (Env< AttrContext > env: contents) {
addByFile(env);
}
}
return contentsByFile;
}
|
public static Todo instance(Context context) {
Todo instance = context.get(todoKey);
if (instance == null)
instance = new Todo(context);
return instance;
}
Get the Todo instance for this context. |
public Iterator<AttrContext> iterator() {
return contents.iterator();
}
|
public boolean offer(Env<AttrContext> e) {
if (contents.add(e)) {
if (contentsByFile != null)
addByFile(e);
return true;
} else {
return false;
}
}
|
public Env<AttrContext> peek() {
return (size() == 0 ? null : contents.get(0));
}
|
public Env<AttrContext> poll() {
if (size() == 0)
return null;
Env< AttrContext > env = contents.remove(0);
if (contentsByFile != null)
removeByFile(env);
return env;
}
|
public int size() {
return contents.size();
}
|