Package org.apache.tapestry.ioc.util

Examples of org.apache.tapestry.ioc.util.BodyBuilder.clear()


        builder.end();

        if (writeOnly)
        {
            builder.clear();
            builder
                    .addln(
                            "throw new java.lang.RuntimeException(\"Expression %s for class %s is write-only.\");",
                            expression,
                            rootClass.getName());
View Full Code Here


        Method writeMethod = writeMethodForTerm(activeType, expression, terms[terms.length - 1]);

        if (writeMethod == null)
        {
            builder.clear();
            builder
                    .addln(
                            "throw new java.lang.RuntimeException(\"Expression %s for class %s is read-only.\");",
                            expression,
                            rootClass.getName());
View Full Code Here

        builder.end();

        if (writeOnly)
        {
            builder.clear();
            builder
                    .addln(
                            "throw new java.lang.RuntimeException(\"Expression %s for class %s is write-only.\");",
                            expression,
                            rootClass.getName());
View Full Code Here

        Method writeMethod = writeMethodForTerm(activeType, expression, terms[terms.length - 1]);

        if (writeMethod == null)
        {
            builder.clear();
            builder
                    .addln(
                            "throw new java.lang.RuntimeException(\"Expression %s for class %s is read-only.\");",
                            expression,
                            rootClass.getName());
View Full Code Here

        builder.end();

        if (writeOnly)
        {
            builder.clear();
            builder
                    .addln(
                            "throw new java.lang.RuntimeException(\"Expression %s for class %s is write-only.\");",
                            expression,
                            rootClass.getName());
View Full Code Here

        Method writeMethod = writeMethodForTerm(activeType, expression, terms[terms.length - 1]);

        if (writeMethod == null)
        {
            builder.clear();
            builder
                    .addln(
                            "throw new java.lang.RuntimeException(\"Expression %s for class %s is read-only.\");",
                            expression,
                            rootClass.getName());
View Full Code Here

        // because (unless the binding is invariant), there's no value to get rid of (and if it is
        // invariant, there's no need to get rid of it).

        if (cache)
        {
            builder.clear();

            builder.addln("if (! %s)", invariantFieldName);
            builder.begin();
            builder.addln("%s = %s;", fieldName, defaultFieldName);
            builder.addln("%s = false;", cachedFieldName);
View Full Code Here

        // because (unless the binding is invariant), there's no value to get rid of (and if it is
        // invariant, there's no need to get rid of it).

        if (cache)
        {
            builder.clear();

            builder.addln("if (! %s)", invariantFieldName);
            builder.begin();
            builder.addln("%s = %s;", fieldName, defaultFieldName);
            builder.addln("%s = false;", cachedFieldName);
View Full Code Here

        PropertyNavigationResult result = writePropertyNavigationCode(builder, rootClass, expression, terms, false);


        if (result == null)
        {
            builder.clear();
            builder
                    .addln("throw new RuntimeException(\"Expression %s for class %s is write-only.\");", expression,
                           rootClass.getName());
        }
        else
View Full Code Here

        Method writeMethod = writeMethodForTerm(result.getFinalStepType(), expression, terms[terms.length - 1]);

        if (writeMethod == null)
        {
            builder.clear();
            builder
                    .addln("throw new RuntimeException(\"Expression %s for class %s is read-only.\");", expression,
                           rootClass.getName());
            classFab.addMethod(Modifier.PUBLIC, SET_SIGNATURE, builder.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.