Package com.sun.codemodel

Examples of com.sun.codemodel.JClass


    }
  }

  @Override
  protected JVar createDeserializeWrapper( @Nonnull JMethod deserializeMethod, @Nonnull JVar deserializeFrom ) {
    JClass wrapperType = codeGenerator.ref( JacksonParserWrapper.class );
    return deserializeMethod.body().decl( wrapperType, "parser", JExpr._new( wrapperType ).arg( deserializeFrom ) );
  }
View Full Code Here


  @Nonnull
  @Override
  public Expressions createReadFromDeserializeFromExpression( @Nonnull AbstractGenerator<?> generator, @Nonnull JDefinedClass serializerClass, @Nonnull JExpression deserializeFrom, JVar wrapper, @Nonnull JVar formatVersion, @Nonnull FieldDeclarationInfo fieldInfo ) {
    JFieldVar constant = getConstant( serializerClass, fieldInfo );

    JClass type = codeGenerator.ref( TypeUtils.getErasure( fieldInfo.getType() ).toString() );
    JInvocation expression = JExpr.invoke( METHOD_NAME_DESERIALIZE ).arg( JExpr.dotclass( type ) ).arg( constant ).arg( formatVersion ).arg( deserializeFrom );
    return new Expressions( expression );
  }
View Full Code Here

                        writer.write("();");

                        f = tp.getClass().getDeclaredField("args");
                        f.setAccessible(true);
                        List<JClass> lcl = CastUtils.cast((List<?>)f.get(tp));
                        JClass cl = lcl.get(0);

                        int cnt = defaultValues.getListLength(path + "/" + varName);
                        for (int x = 0; x < cnt; x++) {

                            writer.write("\n");
View Full Code Here

            }
        }
        public void fillInFields(Writer writer, String indent,
                                      String path, String varName,
                                      JDefinedClass tp) throws IOException {
            JClass sp = tp._extends();
            if (sp instanceof JDefinedClass) {
                fillInFields(writer, indent, path, varName, (JDefinedClass)sp);
            }

            Collection<JMethod> methods = tp.methods();
View Full Code Here

                        writer.write("();");
                       
                        f = tp.getClass().getDeclaredField("args");
                        f.setAccessible(true);
                        List<JClass> lcl = CastUtils.cast((List)f.get(tp));
                        JClass cl = lcl.get(0);
                       
                        int cnt = defaultValues.getListLength(path + "/" + varName);
                        for (int x = 0; x < cnt; x++) {

                            writer.write("\n");
View Full Code Here

            }
        }
        public void fillInFields(Writer writer, String indent,
                                      String path, String varName,
                                      JDefinedClass tp) throws IOException {
            JClass sp = tp._extends();
            if (sp instanceof JDefinedClass) {
                fillInFields(writer, indent, path, varName, (JDefinedClass)sp);
            }
           
            Collection<JMethod> methods = tp.methods();
View Full Code Here

                        writer.write("();");
                       
                        f = tp.getClass().getDeclaredField("args");
                        f.setAccessible(true);
                        List<JClass> lcl = CastUtils.cast((List)f.get(tp));
                        JClass cl = lcl.get(0);
                       
                        int cnt = defaultValues.getListLength(path + "/" + varName);
                        for (int x = 0; x < cnt; x++) {

                            writer.write("\n");
View Full Code Here

            }
        }
        public void fillInFields(Writer writer, String indent,
                                      String path, String varName,
                                      JDefinedClass tp) throws IOException {
            JClass sp = tp._extends();
            if (sp instanceof JDefinedClass) {
                fillInFields(writer, indent, path, varName, (JDefinedClass)sp);
            }
           
            Collection<JMethod> methods = tp.methods();
View Full Code Here

                        writer.write("();");

                        f = tp.getClass().getDeclaredField("args");
                        ReflectionUtil.setAccessible(f);
                        List<JClass> lcl = CastUtils.cast((List<?>)f.get(tp));
                        JClass cl = lcl.get(0);

                        int cnt = defaultValues.getListLength(path + "/" + varName);
                        for (int x = 0; x < cnt; x++) {

                            writer.write("\n");
View Full Code Here

            }
        }
        public void fillInFields(Writer writer, String indent,
                                      String path, String varName,
                                      JDefinedClass tp) throws IOException {
            JClass sp = tp._extends();
            if (sp instanceof JDefinedClass) {
                fillInFields(writer, indent, path, varName, (JDefinedClass)sp);
            }

            Collection<JMethod> methods = tp.methods();
View Full Code Here

TOP

Related Classes of com.sun.codemodel.JClass

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.