JML

org.jmlspecs.jmlunit
Class TestClassGenerator.MethodsIterator

java.lang.Object
  extended byorg.jmlspecs.jmlunit.TestClassGenerator.MethodsIterator
All Implemented Interfaces:
Iterator
Enclosing class:
TestClassGenerator

protected class TestClassGenerator.MethodsIterator
extends Object
implements Iterator

A composite control abstraction useful in this class.


Field Summary
private  TestClassGenerator.MethodInfo cache
          Cached method to return next, null if none
private  Iterator inheritedMethods
          The inherited methods.
private  Iterator methods
          The non-inherited methods.
 
Constructor Summary
TestClassGenerator.MethodsIterator(List methods, List inhMeths)
          Initialize this methods iter.
 
Method Summary
private  void cacheNext()
          Advance the state of the iteration to point to the next testable method declaration.
private  boolean compositeHasNext()
          Does the composition have more elements?
private  Object compositeNextMethod()
          Return the next element in the composition
 boolean hasNext()
           
 Object next()
           
 TestClassGenerator.MethodInfo nextMethod()
          Return the next testable method
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

methods

private Iterator methods
The non-inherited methods.


inheritedMethods

private Iterator inheritedMethods
The inherited methods.


cache

private TestClassGenerator.MethodInfo cache
Cached method to return next, null if none

Constructor Detail

TestClassGenerator.MethodsIterator

public TestClassGenerator.MethodsIterator(List methods,
                                          List inhMeths)
Initialize this methods iter.

Method Detail

compositeHasNext

private boolean compositeHasNext()
Does the composition have more elements?


compositeNextMethod

private Object compositeNextMethod()
Return the next element in the composition


cacheNext

private void cacheNext()
Advance the state of the iteration to point to the next testable method declaration.


hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator

next

public Object next()
Specified by:
next in interface Iterator

nextMethod

public TestClassGenerator.MethodInfo nextMethod()
Return the next testable method


remove

public void remove()
Specified by:
remove in interface Iterator

JML

JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.