public static PdxInstance createPdxEnum(String className, String enumName, int enumOrdinal,
      InternalCache internalCache) {
    if (className == null) {
      throw new IllegalArgumentException("className must not be null");
    }
    if (enumName == null) {
      throw new IllegalArgumentException("enumName must not be null");
    }
    TypeRegistry tr = internalCache.getPdxRegistry();
    EnumInfo ei = new EnumInfo(className, enumName, enumOrdinal);
    return ei.getPdxInstance(tr.defineEnum(ei));
  }
PdxInstances created with this factory can never be deserialized but you can access their fields
just like any other pdx.
<p>
The current implementation of this interface is meant for internal use only. The way it defines a
PdxType is expensive since it can never figure out it is already defined without doing an
expensive check in the type registry. We should optimize this before making this a public
feature.
geode-core/src/main/java/org/apache/geode/pdx/internal/PdxInstanceFactoryImpl.java