"Function" type for java-created enumerators with size. Should be implemented so that calls to
SizeFn#size are kept in sync with the size of the created enum (i.e. if the object underlying an enumerator
changes, calls to SizeFn#size should reflect that change).