proguard-core icon indicating copy to clipboard operation
proguard-core copied to clipboard

Implement Iterator and Iterable interfaces on InternalTypeEnumeration

Open MaartenS11 opened this issue 1 year ago • 1 comments

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);
}

MaartenS11 avatar Jul 29 '23 14:07 MaartenS11

Can you add a few tests for this class and its use with the iterator/iterable interface?

rubenpieters avatar Aug 01 '23 12:08 rubenpieters