Package com.google.gwt.user.rebind

Examples of com.google.gwt.user.rebind.SourceWriter.indentln()


        String elementType = request.isCollectionType()
            ? request.getCollectionElementType().getQualifiedSourceName()
                + ".class" : "null";
        String returnTypeBaseQualifiedName = ModelUtils.ensureBaseType(
            request.getDataType()).getQualifiedSourceName();
        sw.indentln(
            "return new %s(\"%s\", new Object[] {%s}, propertyRefs, %s.class, %s);",
            RequestData.class.getCanonicalName(), operation, parameterArray,
            returnTypeBaseQualifiedName, elementType);
        sw.println("}");
View Full Code Here


        sw.println("public BeanModelFactory getFactory(Class b) {");
        sw.indent();
        sw.println("String n = b.getName();");
        sw.println("if (m == null) {");
        sw.indentln("m = new FastMap<BeanModelFactory>();");
        sw.println("}");
        sw.println("if (m.get(n) == null) {");
        sw.indent();
        StringBuffer sb = new StringBuffer();
        for (int i = 0; i < beans.size(); i++) {
View Full Code Here

    // Clone constructor
    // public FooIntfAutoBean(FooIntfoAutoBean toClone, boolean deepClone) {
    sw.println("public %1$s(%1$s toClone, boolean deep) {",
        type.getSimpleSourceName());
    sw.indentln("super(toClone, deep);");
    sw.println("}");

    // Wrapping constructor
    // public FooIntfAutoBean(AutoBeanFactory factory, FooIntfo wrapped) {
    sw.println("public %s(%s factory, %s wrapped) {",
View Full Code Here

    // Wrapping constructor
    // public FooIntfAutoBean(AutoBeanFactory factory, FooIntfo wrapped) {
    sw.println("public %s(%s factory, %s wrapped) {",
        type.getSimpleSourceName(), AutoBeanFactory.class.getCanonicalName(),
        type.getPeerType().getQualifiedSourceName());
    sw.indentln("super(factory, wrapped);");
    sw.println("}");

    // public FooIntf as() {return shim;}
    sw.println("public %s as() {return shim;}",
        type.getPeerType().getQualifiedSourceName());
View Full Code Here

        type.getPeerType().getQualifiedSourceName());

    // public FooIntfAutoBean clone(boolean deep) {
    sw.println("public %s clone(boolean deep) {", type.getQualifiedSourceName());
    // return new FooIntfAutoBean(this, deep);
    sw.indentln("return new %s(this, deep);", type.getSimpleSourceName());
    sw.println("}");

    // public Class<Intf> getType() {return Intf.class;}
    sw.println("public Class<%1$s> getType() {return %1$s.class;}",
        ModelUtils.ensureBaseType(type.getPeerType()).getQualifiedSourceName());
View Full Code Here

        String elementType = request.isCollectionType()
            ? request.getCollectionElementType().getQualifiedSourceName()
                + ".class" : "null";
        String returnTypeBaseQualifiedName = ModelUtils.ensureBaseType(
            request.getDataType()).getQualifiedSourceName();
        sw.indentln(
            "return new %s(\"%s\", new Object[] {%s}, propertyRefs, %s.class, %s);",
            RequestData.class.getCanonicalName(), operation, parameterArray,
            returnTypeBaseQualifiedName, elementType);
        sw.println("}");
View Full Code Here

        String mangledTypeName = type.getQualifiedSourceName().replace('.', '_');
        sw.println("toReturn.set(class_" + mangledTypeName + "().getName()");
        if (serializerMethod == null) {
        } else {
          serializerMethods.put(type, serializerMethod);
          sw.indentln(",serializer_" + mangledTypeName + "()");
        }
        if (fieldRefs.isEmpty()) {
          sw.indentln(");");
        } else {
          fields.put(type, fieldRefs);
View Full Code Here

        } else {
          serializerMethods.put(type, serializerMethod);
          sw.indentln(",serializer_" + mangledTypeName + "()");
        }
        if (fieldRefs.isEmpty()) {
          sw.indentln(");");
        } else {
          fields.put(type, fieldRefs);
          sw.indentln(",fields_" + mangledTypeName + "());");
        }
      }
View Full Code Here

        }
        if (fieldRefs.isEmpty()) {
          sw.indentln(");");
        } else {
          fields.put(type, fieldRefs);
          sw.indentln(",fields_" + mangledTypeName + "());");
        }
      }
    }

    sw.println("return toReturn;");
View Full Code Here

    sw.println("}");

    for (JType classLiteral : classLiterals) {
      sw.println("public static native Class class_"
          + classLiteral.getQualifiedSourceName().replace('.', '_') + "() /*-{");
      sw.indentln("return @" + classLiteral.getQualifiedSourceName()
          + "::class;");
      sw.println("}-*/;");
      sw.println();
    }

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.