code: public Feature asFeature(Object objectToTransform) throws InvalidObjectReaderException {
          if (objectToTransform == null) {
              throw new IllegalArgumentException("Given object may not be null");
          }
          if (objectToTransform.getClass() != entityClass) {
              throw new InvalidObjectReaderException("Class of target object does not correspond with entityclass of this reader.");
          }
          Feature proxy = (Feature) Proxy.newProxyInstance(entityClass.getClassLoader(),
                  new Class[]{Feature.class}, new ObjectInvocationHandler(objectToTransform));
          return proxy;
      }
docs: Wraps the given object in a feature interface. This method will first validate whether the
  class it represents is indeed a feature (containing exactly one geometry and id) and will then
  generate a wrapper around the original object that obeys to the Feature interface.
  If this method is invoked multiple times on the same object, the same wrapper will be returned in
  each of these calls.
  
  @param objectToTransform the object for which a feature is desired.
  @return a feature wrapper around the given object
  @throws InvalidObjectReaderException If the class of objectToTransform does not correspond with the entityclass
  of this reader
  @throws IllegalArgumentException     if the given objectToTransform is null