Examples of SetSimpleTemplatedFile


Examples of rocket.json.rebind.setsimple.SetSimpleTemplatedFile

      context.debug("Created setter for field " + field + " setter method " + setter);

      // simple type ?
      if (fieldType.isPrimitive() || fieldType.equals(stringType)) {
        final SetSimpleTemplatedFile template = new SetSimpleTemplatedFile();

        template.setFieldSetter(setter);
        template.setJavascriptPropertyName(this.getJavascriptPropertyName(field));
        template.setSerializer(this.getSerializer(field));

        body.add(template);
        continue;
      }

      final SetComplexTemplatedFile template = new SetComplexTemplatedFile();
      template.setFieldSetter(setter);
      template.setJavascriptPropertyName(this.getJavascriptPropertyName(field));
      template.setFieldType(fieldType);

      final Type serializer = this.getSerializer(field);
      template.setSerializer(serializer);

      final String readMethodName = this.selectReadMethod(fieldType);
      final Method readMethod = serializer.getMostDerivedMethod(readMethodName, Collections.nCopies(1, this.getJsonValue()));
      template.setReadMethod(readMethod);

      body.add(template);
    }

    context.unbranch();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.