Package org.msgpack.template

Examples of org.msgpack.template.BeansFieldEntry


  @Override
  public Template buildTemplate(Class<?> targetClass, IFieldEntry[] entries) {
    ReflectionEntry[] refEntries = new ReflectionEntry[entries.length];
    for(int i = 0;i < entries.length;i++){
      BeansFieldEntry e = (BeansFieldEntry)entries[i];
      Class<?> type = e.getType();
      if(type.equals(boolean.class)) {
        refEntries[i] = new ReflectionEntry(e);
      } else if(type.equals(byte.class)) {
        refEntries[i] = new ReflectionEntry(e);
      } else if(type.equals(short.class)) {
        refEntries[i] = new ReflectionEntry(e);
      } else if(type.equals(int.class)) {
        refEntries[i] = new ReflectionEntry(e);
      } else if(type.equals(long.class)) {
        refEntries[i] = new ReflectionEntry(e);
      } else if(type.equals(float.class)) {
        refEntries[i] = new ReflectionEntry(e);
      } else if(type.equals(double.class)) {
        refEntries[i] = new ReflectionEntry(e);
      } else {
        Template tmpl = TemplateRegistry.lookup(e.getGenericType(), true);
        refEntries[i] = new ObjectFieldEntry(e, tmpl);
      }
    }
    return new BeansReflectionTemplate(targetClass,refEntries);
  }
View Full Code Here

TOP

Related Classes of org.msgpack.template.BeansFieldEntry

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.