Package org.apache.xmlbeans.impl.jam
Class JamClassIterator
- java.lang.Object
-
- org.apache.xmlbeans.impl.jam.JamClassIterator
-
- All Implemented Interfaces:
java.util.Iterator
public class JamClassIterator extends java.lang.Object implements java.util.Iterator
A typed Iterator on a set of JClasses. The use of JamClassIterator (as opposed to arrays or Collections of JClass) is encouraged as it can significantly reduce memory consumption when using JAM to process large numbers of java classes.
-
-
Constructor Summary
Constructors Constructor Description JamClassIterator(JamClassLoader loader, java.lang.String[] classes)
Constructs a new JamClassIterator
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getSize()
boolean
hasNext()
Returns true if classes remain to be iterated upon.java.lang.Object
next()
Returns the next class.JClass
nextClass()
Returns the next class.void
remove()
Not supported.
-
-
-
Constructor Detail
-
JamClassIterator
public JamClassIterator(JamClassLoader loader, java.lang.String[] classes)
Constructs a new JamClassIterator- Parameters:
loader
- JamClassLoader from which to load the classesclasses
- Array of full-qualified classnames to iterate on.- Throws:
java.lang.IllegalArgumentException
- if either argument is null.
-
-
Method Detail
-
nextClass
public JClass nextClass()
Returns the next class. Exactly equivalent to (JClass)next().- Throws:
java.lang.IndexOutOfBoundsException
- if there are no classes left to iterate on.
-
hasNext
public boolean hasNext()
Returns true if classes remain to be iterated upon.- Specified by:
hasNext
in interfacejava.util.Iterator
-
next
public java.lang.Object next()
Returns the next class.- Specified by:
next
in interfacejava.util.Iterator
- Throws:
java.lang.IndexOutOfBoundsException
- if there are no classes left to iterate on.
-
getSize
public int getSize()
-
remove
public void remove()
Not supported.- Specified by:
remove
in interfacejava.util.Iterator
- Throws:
java.lang.UnsupportedOperationException
-
-