Examples of endl()


Examples of org.apache.openjpa.lib.util.CodeFormat.endl()

        for (Iterator itr = pkgs.iterator(); itr.hasNext();) {
            pkg = (String) itr.next();
            if (pkg.length() > 0 && !"java.lang".equals(pkg)
                && !base.equals(pkg)) {
                if (imports.length() > 0)
                    imports.endl();
                imports.append("import ").append(pkg).append(".*;");
            }
        }
        return imports.toString();
    }
View Full Code Here

Examples of org.apache.openjpa.lib.util.CodeFormat.endl()

                cons.append(", ");
            cons.append(fieldType).append(" ").append(propertyName);

            if (_meta.getPCSuperclass() == null) {
                if (i > 0)
                    body.endl();
                body.tab(2);
                if (propertyName.equals(fields[i].getName()))
                    body.append("this.");
                body.append(fields[i].getName());
                body.append(" = ").append(propertyName).append(";");
View Full Code Here

Examples of org.apache.openjpa.lib.util.CodeFormat.endl()

        if (constructor.length() > 0)
            code.afterSection().append(constructor);
        if (fieldCode.length() > 0)
            code.afterSection().append(fieldCode);
        code.endl();

        closeClassBrace(code);

        return code.toString();
    }
View Full Code Here

Examples of org.apache.openjpa.lib.util.CodeFormat.endl()

        code.tab(4).append("part = str.substring").openParen(true).
            append("last").closeParen().append(";").endl();
        code.tab(4).append("last = str.length").parens().append(";").
            endl().closeBrace(4);
        if (!code.getBraceOnSameLine())
            code.endl().tab(3);
        else
            code.append(" ");
        code.append("else").openBrace(4).endl();
        code.tab(4).append("part = str.substring").openParen(true).
            append("last, next").closeParen().append(";").endl();
View Full Code Here

Examples of org.apache.openjpa.lib.util.CodeFormat.endl()

        code.tab(4).append("last = next + ").append(_token.length()).
            append(";").endl().closeBrace(4).endl();

        code.tab(3).append("return part;").endl();
        code.closeBrace(3);
        code.endl().closeBrace(2);
        return code.toString();
    }

    /**
     * Return the file that this tool should output to.
View Full Code Here

Examples of org.apache.openjpa.lib.util.CodeFormat.endl()

            code.append("static ");
        code.append("class ").append(className);
        if (code.getBraceOnSameLine())
            code.append(" ");
        else
            code.endl().tab();

        if (superOidClass != null) {
            code.append("extends " + Strings.getClassName(superOidClass));
            if (code.getBraceOnSameLine())
                code.append(" ");
View Full Code Here

Examples of org.apache.openjpa.lib.util.CodeFormat.endl()

        if (superOidClass != null) {
            code.append("extends " + Strings.getClassName(superOidClass));
            if (code.getBraceOnSameLine())
                code.append(" ");
            else
                code.endl().tab();
        }
        code.append("implements Serializable").openBrace(1).endl();

        // if we use a byte array we need a static array for encoding to string
        if (bytes) {
View Full Code Here

Examples of org.apache.openjpa.lib.util.CodeFormat.endl()

                append(".class;").endl();
        code.closeBrace(2);

        // field declarations
        if (fieldDecs.length() > 0)
            code.endl(2).append(fieldDecs);

        // default constructor
        code.afterSection().tab().append("public ").append(className).
            parens().openBrace(2).endl();
        code.closeBrace(2);
View Full Code Here

Examples of org.apache.openjpa.lib.util.CodeFormat.endl()

        // base classes might need to define a custom tokenizer
        if (superOidClass == null && getTokenizer(false) == TOKENIZER_CUSTOM)
            code.afterSection().append(getCustomTokenizerClass());

        code.endl();
        code.closeBrace(1);

        _code = code.toString();

        // if this is an inner class, then indent the entire
View Full Code Here

Examples of org.apache.openjpa.lib.util.CodeFormat.endl()

        for (Iterator itr = pkgs.iterator(); itr.hasNext();) {
            pkg = (String) itr.next();
            if (pkg.length() > 0 && !"java.lang".equals(pkg)
                && !base.equals(pkg)) {
                if (imports.length() > 0)
                    imports.endl();
                imports.append("import ").append(pkg).append(".*;");
            }
        }
        return imports.toString();
    }
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.