Package org.apache.tapestry.annotations

Examples of org.apache.tapestry.annotations.Meta


        replay();

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

        Meta meta = ct.getAnnotation(Meta.class);

        assertNotNull(meta);

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


        replay();

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

        Meta meta = ct.getAnnotation(Meta.class);

        assertNotNull(meta);

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

    @Test
    public void has_meta_data()
    {
        ClassTransformation ct = mockClassTransformation();
        MutableComponentModel model = mockMutableComponentModel();
        Meta annotation = newMock(Meta.class);

        train_getAnnotation(ct, Meta.class, annotation);

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

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

    @Test
    public void has_meta_data()
    {
        ClassTransformation ct = mockClassTransformation();
        MutableComponentModel model = mockMutableComponentModel();
        Meta annotation = newMock(Meta.class);

        train_getAnnotation(ct, Meta.class, annotation);

        expect(annotation.value()).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, logger);

        Meta meta = ct.getAnnotation(Meta.class);

        assertNotNull(meta);

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

        replay();

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

        Meta meta = ct.getAnnotation(Meta.class);

        assertNotNull(meta);

        // 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)
    {
        Meta annotation = transformation.getAnnotation(Meta.class);

        if (annotation == null)
            return;

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

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

public class MetaWorker implements ComponentClassTransformWorker
{

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

        if (annotation == null)
            return;

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

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

        replay();

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

        Meta meta = ct.getAnnotation(Meta.class);

        assertNotNull(meta);

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

    @Test
    public void has_meta_data()
    {
        ClassTransformation ct = mockClassTransformation();
        MutableComponentModel model = mockMutableComponentModel();
        Meta annotation = newMock(Meta.class);

        train_getAnnotation(ct, Meta.class, annotation);

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

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

TOP

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

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.