proguard-core
proguard-core copied to clipboard
Implement Iterator and Iterable interfaces on InternalTypeEnumeration
This allows the InternalTypeEnumeration to be used in for-each loops. For compatibility reasons these methods just call the existing hasMoreTypes
and nextType
methods.
Example:
InternalTypeEnumeration internalTypeEnumeration = new InternalTypeEnumeration("(Ljava/lang/Object;I)Ljava/lang/Integer;");
for (String type : internalTypeEnumeration) {
System.out.println(type);
}
Can you add a few tests for this class and its use with the iterator/iterable interface?