Package com.avaje.ebeaninternal.util.ParamTypeHelper

Examples of com.avaje.ebeaninternal.util.ParamTypeHelper.TypeInfo


    return list;
  }

  public Object toObject(Type genericType, String json) throws IOException {

    TypeInfo info = ParamTypeHelper.getTypeInfo(genericType);
    ManyType manyType = info.getManyType();
    switch (manyType) {
    case NONE:
      return toBean(info.getBeanType(), json);

    case LIST:
      return toList(info.getBeanType(), json);

    default:
      throw new IOException("Type " + manyType + " not supported");
    }
  }
View Full Code Here


    }
  }

  public Object toObject(Type genericType, Reader json) throws IOException {

    TypeInfo info = ParamTypeHelper.getTypeInfo(genericType);
    ManyType manyType = info.getManyType();
    switch (manyType) {
    case NONE:
      return toBean(info.getBeanType(), json);

    case LIST:
      return toList(info.getBeanType(), json);

    default:
      throw new IOException("Type " + manyType + " not supported");
    }
  }
View Full Code Here

    }
  }

  public boolean isSupportedType(java.lang.reflect.Type genericType) {

    TypeInfo typeInfo = ParamTypeHelper.getTypeInfo(genericType);
    if (typeInfo == null) {
      return false;
    }
    return getBeanDescriptor(typeInfo.getBeanType()) != null;
  }
View Full Code Here

TOP

Related Classes of com.avaje.ebeaninternal.util.ParamTypeHelper.TypeInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.