Package org.apache.tapestry.annotations

Examples of org.apache.tapestry.annotations.ApplicationState


    }

    private void replaceRead(ClassTransformation transformation, String fieldName, String fieldType,
                             String managerFieldName, String typeFieldName)
    {
        ApplicationState annotation = transformation.getFieldAnnotation(fieldName, ApplicationState.class);


        String readMethodName = transformation.newMemberName("read", fieldName);

        TransformMethodSignature readMethodSignature = new TransformMethodSignature(Modifier.PRIVATE, fieldType,
                                                                                    readMethodName, null, null);

        String methodName = annotation.create() ? "get" : "getIfExists";

        String body = format("return (%s) %s.%s(%s);", fieldType, managerFieldName, methodName, typeFieldName);

        transformation.addMethod(readMethodSignature, body);
View Full Code Here


    }

    private void replaceRead(ClassTransformation transformation, String fieldName, String fieldType,
                             String managerFieldName, String typeFieldName)
    {
        ApplicationState annotation = transformation.getFieldAnnotation(fieldName, ApplicationState.class);


        String readMethodName = transformation.newMemberName("read", fieldName);

        TransformMethodSignature readMethodSignature = new TransformMethodSignature(Modifier.PRIVATE, fieldType,
                                                                                    readMethodName, null, null);

        String methodName = annotation.create() ? "get" : "getIfExists";

        String body = format("return (%s) %s.%s(%s);", fieldType, managerFieldName, methodName, typeFieldName);

        transformation.addMethod(readMethodSignature, body);
View Full Code Here

TOP

Related Classes of org.apache.tapestry.annotations.ApplicationState

Copyright © 2018 www.massapicom. 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.