ch.sahits.codegen.java.model.util
Class JETInterfaceImplementer

java.lang.Object
  extended by ch.sahits.codegen.java.model.util.JETInterfaceImplementer
All Implemented Interfaces:
java.util.Iterator<java.lang.String>

public final class JETInterfaceImplementer
extends java.lang.Object
implements java.util.Iterator<java.lang.String>

This helper class provides utilitys for a JETemplate to add the method signatures of an interface. Over the signatures can be iterated.

Author:
Andi Hotz since 1.2.0

Constructor Summary
JETInterfaceImplementer(java.util.List<java.lang.Class> interfaces, java.util.List<java.lang.String> ignoreMethods)
          Initialize the method signatures without the body of the method.
 
Method Summary
 boolean hasNext()
          Check if there is a further method signature
 java.util.List<java.lang.Class> imports()
          Retrieve the list of needed imports
 java.lang.String next()
          Retrieve the next method signature
 void remove()
          Removes from the underlying collection the last element returned by the iterator (optional operation).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JETInterfaceImplementer

public JETInterfaceImplementer(java.util.List<java.lang.Class> interfaces,
                               java.util.List<java.lang.String> ignoreMethods)
Initialize the method signatures without the body of the method. A list of method names that should be ignored can be supplied

Parameters:
interfaces - List of interfaces that are implementend and contain the methods to implement
ignoreMethods - List of method names to be ignored.
Method Detail

hasNext

public boolean hasNext()
Check if there is a further method signature

Specified by:
hasNext in interface java.util.Iterator<java.lang.String>
Returns:
true if further signatures are avalable

next

public java.lang.String next()
Retrieve the next method signature

Specified by:
next in interface java.util.Iterator<java.lang.String>
Returns:
Signature represented as a String

remove

public void remove()
Removes from the underlying collection the last element returned by the iterator (optional operation). This method can be called only once per call to next. The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method.

Specified by:
remove in interface java.util.Iterator<java.lang.String>

imports

public java.util.List<java.lang.Class> imports()
Retrieve the list of needed imports

Returns:
List of imports