com.ibm.bsf.engines.rexx
Class EnumerationWrapper

java.lang.Object
  |
  +--com.ibm.bsf.engines.rexx.EnumerationWrapper
All Implemented Interfaces:
java.util.Enumeration

public class EnumerationWrapper
extends java.lang.Object
implements java.util.Enumeration

Class to allow Rexx enumerating objects of classes implementing the Enumeration interface, if running under Java 1.1. It turns out that on all Java versions (tested on Sun's Windows versions of: 1.1.8, 1.2.2, 1.3.1_06, 1.4.1_01) "Method.invoke()" throws an "IllegalAccessException", if accessing public methods of inner classes.

Since:
2003-02-12 by rgf
Version:
1.0.1, 2003-05-30
Author:
Rony G. Flatscher

Field Summary
private  java.lang.Object enumObj
          Private object storing the object to enumerate.
 
Constructor Summary
EnumerationWrapper(java.util.Enumeration enum)
           
 
Method Summary
 boolean hasMoreElements()
          Implements the interface java.util.Enumeration.hasMoreElements().
 java.lang.Object nextElement()
          Implements the interface java.util.Enumeration.nextElement().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

enumObj

private java.lang.Object enumObj
Private object storing the object to enumerate.

Constructor Detail

EnumerationWrapper

public EnumerationWrapper(java.util.Enumeration enum)
Method Detail

hasMoreElements

public boolean hasMoreElements()
Implements the interface java.util.Enumeration.hasMoreElements().

Specified by:
hasMoreElements in interface java.util.Enumeration

nextElement

public java.lang.Object nextElement()
Implements the interface java.util.Enumeration.nextElement().

Specified by:
nextElement in interface java.util.Enumeration
Throws:
java.util.NoSuchElementException - raised, if using the Enumerator interface and moving beyond the end of the supplier object.