Package org.apache.tapestry5.annotations

Examples of org.apache.tapestry5.annotations.Cached.watch()


            }
        });

        Cached annotation = method.getAnnotation(Cached.class);

        MethodResultCacheFactory factory = createFactory(plasticClass, annotation.watch(), method);

        MethodAdvice advice = createAdvice(cacheField, factory);

        method.addAdvice(advice);
    }
View Full Code Here


        FieldAccess fieldAccess = createPerThreadValueField(transformation, method);

        Cached annotation = method.getAnnotation(Cached.class);

        MethodResultCacheFactory factory = createFactory(transformation, annotation.watch(), method);

        ComponentMethodAdvice advice = createAdvice(fieldAccess, factory);

        method.addAdvice(advice);
    }
View Full Code Here

            }
        });

        Cached annotation = method.getAnnotation(Cached.class);

        MethodResultCacheFactory factory = createFactory(plasticClass, annotation.watch(), method);

        MethodAdvice advice = createAdvice(cacheField, factory);

        method.addAdvice(advice);
    }
View Full Code Here

            String calledField = transformation.addField(PRIVATE, "boolean", fieldName + "$called");

            Cached once = transformation.getMethodAnnotation(method, Cached.class);
            String bindingField = null;
            String bindingValueField = null;
            boolean watching = once.watch().length() > 0;

            if (watching)
            {
                // add fields to store the binding and the value
                bindingField = transformation.addField(PRIVATE, Binding.class.getCanonicalName(),
View Full Code Here

                String body = String.format("%s = %s.newBinding(\"Watch expression\", %s, \"%s\", \"%s\");",
                                            bindingField,
                                            bindingSourceField,
                                            transformation.getResourcesFieldName(),
                                            BindingConstants.PROP,
                                            once.watch());

                transformation.extendMethod(TransformConstants.CONTAINING_PAGE_DID_LOAD_SIGNATURE, body);
            }

            BodyBuilder b = new BodyBuilder();
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.