Examples of indentLeft()


Examples of org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.ClassScope.indentLeft()

      typeHandler.writeStaticClassJava(rootClassScope);
    }

    rootClassScope.writeClassMembers();

    rootClassScope.indentLeft();

    rootClassScope.startLine("}\n");

    Map<Class<?>, String> type2ImplClassName = new HashMap<Class<?>, String>();
    for (TypeHandler<?> typeHandler : type2TypeHandler.values()) {
View Full Code Here

Examples of org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.ClassScope.indentLeft()

    classScope.startLine("public static " + valueImplClassName + " parse(Object input)" +
        Util.THROWS_CLAUSE + " {\n");
    classScope.indentRight();
    subtypeAspect.writeParseMethodJava(classScope, valueImplClassName, "input");
    classScope.indentLeft();
    classScope.startLine("}");
    classScope.append("\n");
    classScope.startLine(valueImplClassName + "(Object input");
    subtypeAspect.writeSuperConstructorParamJava(classScope);
    classScope.append(")" + Util.THROWS_CLAUSE + " {\n");
View Full Code Here

Examples of org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.ClassScope.indentLeft()

    BaseHandlersLibrary.writeBaseMethodsJava(classScope, this);

    subtypeAspect.writeHelperMethodsJava(classScope);

    classScope.indentLeft();
    classScope.startLine("}\n");
    fileScope.append("\n");
  }

  public void writeMapFillJava(ClassScope scope, String mapReference) {
View Full Code Here

Examples of org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.MethodScope.indentLeft()

      if (quickParser.javaCodeThrowsException()) {
        scope.startLine("try {\n");
        scope.indentRight();
        quickParser.writeParseQuickCode(scope, valueRef, "r1");
        scope.startLine("result = r1;\n");
        scope.indentLeft();
        scope.startLine("} catch (" + Util.BASE_PACKAGE + ".JsonProtocolParseException e) {\n");
        scope.startLine("  throw new " + Util.BASE_PACKAGE + ".JsonProtocolParseException(" +
            "\"Failed to parse field " + fieldName + " in type ");
        scope.append(typeClass.getName() + "\", e);\n");
        scope.startLine("}\n");
View Full Code Here

Examples of org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.MethodScope.indentLeft()

        scope.startLine("}\n");
      } else {
        quickParser.writeParseQuickCode(scope, valueRef, "r1");
        scope.startLine("result = r1;\n");
      }
      scope.indentLeft();
      scope.startLine("} else {\n");
      scope.indentRight();
      if (isOptional) {
        scope.startLine("result = null;\n");
      } else {
View Full Code Here

Examples of org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.MethodScope.indentLeft()

        scope.startLine("result = null;\n");
      } else {
        scope.startLine("throw new " + Util.BASE_PACKAGE + ".JsonProtocolParseException(" +
            "\"Field is not optional: " + fieldName + "\");\n");
      }
      scope.indentLeft();
      scope.startLine("}\n");

      if (wrap) {
        scope.indentLeft();
        scope.startLine("} catch (" + Util.BASE_PACKAGE + ".JsonProtocolParseException e) {\n");
View Full Code Here

Examples of org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.MethodScope.indentLeft()

      }
      scope.indentLeft();
      scope.startLine("}\n");

      if (wrap) {
        scope.indentLeft();
        scope.startLine("} catch (" + Util.BASE_PACKAGE + ".JsonProtocolParseException e) {\n");
        scope.startLine("  throw new " + Util.BASE_PACKAGE +
            ".implutil.CommonImpl.ParseRuntimeException(" +
            "\"On demand parsing failed for \" + underlying, e);\n");
        scope.startLine("}\n");
View Full Code Here

Examples of org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.MethodScope.indentLeft()

            ".implutil.CommonImpl.ParseRuntimeException(" +
            "\"On demand parsing failed for \" + underlying, e);\n");
        scope.startLine("}\n");
      }
      scope.startLine("return result;\n");
      scope.indentLeft();
      scope.startLine("}\n");
    }
  }

  /**
 
View Full Code Here

Examples of org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.MethodScope.indentLeft()

      scope.startLine("if (" + parseResultRef + " != null) {\n");
      scope.indentRight();
      getFieldBinding().writeSetAndGetJava(scope, parseResultRef, "cachedResult");
      scope.startLine(parseResultRef + " = cachedResult;\n");
      scope.indentLeft();
      scope.startLine("}\n");

      scope.startLine("return " + parseResultRef + ";\n");

      scope.indentLeft();
View Full Code Here

Examples of org.chromium.sdk.internal.protocolparser.dynamicimpl.JavaCodeGenerator.MethodScope.indentLeft()

      scope.indentLeft();
      scope.startLine("}\n");

      scope.startLine("return " + parseResultRef + ";\n");

      scope.indentLeft();
      scope.startLine("}\n");
    }

    protected abstract void writeParseJava(MethodScope scope, String parseResultRef);
  }
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.