Examples of unindent()


Examples of org.exolab.javasource.JSourceCode.unindent()

                + jEnum.getLocalName() + ".values()) {");
        sourceCode.indent();
        sourceCode.add("if (c.value.equals(value)) {");
        sourceCode.indent();
        sourceCode.add("return c;");
        sourceCode.unindent();
        sourceCode.add("}");
        sourceCode.unindent();
        sourceCode.add("}");
        sourceCode.add("throw new IllegalArgumentException(value);");
        fromValueMethod.setSourceCode(sourceCode);
View Full Code Here

Examples of org.exolab.javasource.JSourceCode.unindent()

        sourceCode.add("if (c.value.equals(value)) {");
        sourceCode.indent();
        sourceCode.add("return c;");
        sourceCode.unindent();
        sourceCode.add("}");
        sourceCode.unindent();
        sourceCode.add("}");
        sourceCode.add("throw new IllegalArgumentException(value);");
        fromValueMethod.setSourceCode(sourceCode);
        modifiers = new JModifiers();
        modifiers.setStatic(true);
View Full Code Here

Examples of org.exolab.javasource.JSourceCode.unindent()

        sourceCode.append(".iterator();");
        sourceCode.add("");
        sourceCode.add("while (i.hasNext()) {");
        sourceCode.indent();
        sourceCode.add("v.add(i.next());");
        sourceCode.unindent();
        sourceCode.add("");
        sourceCode.add("return v.elements();");

        jClass.addMethod(method);
    }
View Full Code Here

Examples of org.exolab.javasource.JSourceCode.unindent()

                jsc.append(".length; i++) {");
                jsc.indent();
                jsc.add("result.append(");
                jsc.append(name);
                jsc.append("[i] + \" \");");
                jsc.unindent();
                jsc.add("}");
                jsc.add("result.append(\"]\");");
                jsc.unindent();
                jsc.add("}");
            } else {
View Full Code Here

Examples of org.exolab.javasource.JSourceCode.unindent()

                jsc.append(name);
                jsc.append("[i] + \" \");");
                jsc.unindent();
                jsc.add("}");
                jsc.add("result.append(\"]\");");
                jsc.unindent();
                jsc.add("}");
            } else {
                jsc.add("if ( (");
                jsc.append(name);
                jsc.append(" != null) && (");
View Full Code Here

Examples of org.exolab.javasource.JSourceCode.unindent()

                jsc.append(".getClass().isAssignableFrom(CastorTestable.class)))");
                jsc.indent();
                jsc.add("result.append(((CastorTestable)");
                jsc.append(name);
                jsc.append(").dumpFields());");
                jsc.unindent();
                jsc.add("else result.append(\"Field ");
                jsc.append(name);
                jsc.append(":\" +");
                jsc.append(name);
                jsc.append("+\"\\n\");");
View Full Code Here

Examples of org.exolab.javasource.JSourceCode.unindent()

                               "true if this object is valid according to the schema");
        jsc = jMethod.getSourceCode();
        jsc.add("try {");
        jsc.indent();
        jsc.add("validate();");
        jsc.unindent();
        jsc.add("} catch (org.exolab.castor.xml.ValidationException vex) {");
        jsc.indent();
        jsc.add("return false;");
        jsc.unindent();
        jsc.add("}");
View Full Code Here

Examples of org.exolab.javasource.JSourceCode.unindent()

        jsc.add("validate();");
        jsc.unindent();
        jsc.add("} catch (org.exolab.castor.xml.ValidationException vex) {");
        jsc.indent();
        jsc.add("return false;");
        jsc.unindent();
        jsc.add("}");
        jsc.add("return true;");
        jClass.addMethod(jMethod);
    } //-- createValidateMethods
View Full Code Here

Examples of org.exolab.javasource.JSourceCode.unindent()

        if (jclass.getSuperClassQualifiedName() != null) {
            jsc.add("");
            jsc.add("if (super.equals(obj)==false)");
            jsc.indent();
            jsc.add("return false;");
            jsc.unindent();
        }
        jsc.add("");
        jsc.add("if (obj instanceof ");
        jsc.append(jclass.getLocalName());
        jsc.append(") {");
View Full Code Here

Examples of org.exolab.javasource.JSourceCode.unindent()

                jsc.add("if (temp.");
                jsc.append(name);
                jsc.append(" == null) ");
                jsc.indent();
                jsc.append("return false;");
                jsc.unindent();
                jsc.add("if (this.");
                jsc.append(name);
                jsc.append(" != temp.");
                jsc.append(name);
                jsc.append(") {");
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.