Package org.apache.tapestry.annotations

Examples of org.apache.tapestry.annotations.ComponentClass


    @Test
    public void has_meta_data()
    {
        ClassTransformation ct = newClassTransformation();
        MutableComponentModel model = newMutableComponentModel();
        ComponentClass annotation = newMock(ComponentClass.class);

        train_getAnnotation(ct, ComponentClass.class, annotation);

        expect(annotation.meta()).andReturn(new String[]
        { "foo=bar", "baz=biff" });

        model.setMeta("foo", "bar");
        model.setMeta("baz", "biff");
View Full Code Here


        replay();

        ClassTransformation ct = createClassTransformation(ParentClass.class, log);

        ComponentClass cc = ct.getAnnotation(ComponentClass.class);

        assertNotNull(cc);

        // Try again (the annotations will be cached). Use an annotation
        // that will not be present.
View Full Code Here

public class MetaWorker implements ComponentClassTransformWorker
{

    public void transform(ClassTransformation transformation, MutableComponentModel model)
    {
        ComponentClass annotation = transformation.getAnnotation(ComponentClass.class);

        if (annotation == null)
            return;

        for (String meta : annotation.meta())
        {
            KeyValue kv = TapestryUtils.parseKeyValue(meta);

            model.setMeta(kv.getKey(), kv.getValue());
        }
View Full Code Here

TOP

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

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.