Package org.apache.tapestry.annotations

Examples of org.apache.tapestry.annotations.Mixin


    public void field_with_explicit_type()
    {
        ComponentClassResolver resolver = mockComponentClassResolver();
        ClassTransformation transformation = mockClassTransformation();
        MutableComponentModel model = mockMutableComponentModel();
        Mixin annotation = newMixin("Bar");

        train_findFieldsWithAnnotation(transformation, Mixin.class, "fred");
        train_getFieldAnnotation(transformation, "fred", Mixin.class, annotation);
        train_getFieldType(transformation, "fred", "foo.bar.Baz");
View Full Code Here


    public void field_with_no_specific_mixin_type()
    {
        ComponentClassResolver resolver = mockComponentClassResolver();
        ClassTransformation transformation = mockClassTransformation();
        MutableComponentModel model = mockMutableComponentModel();
        Mixin annotation = newMixin("");

        train_findFieldsWithAnnotation(transformation, Mixin.class, "fred");
        train_getFieldAnnotation(transformation, "fred", Mixin.class, annotation);
        train_getFieldType(transformation, "fred", "foo.bar.Baz");
View Full Code Here

        expect(resolver.resolveMixinTypeToClassName(mixinType)).andReturn(mixinClassName);
    }

    private Mixin newMixin(String value)
    {
        Mixin annotation = newMock(Mixin.class);

        expect(annotation.value()).andReturn(value);

        return annotation;
    }
View Full Code Here

    public void field_with_explicit_type()
    {
        ComponentClassResolver resolver = mockComponentClassResolver();
        ClassTransformation transformation = mockClassTransformation();
        MutableComponentModel model = mockMutableComponentModel();
        Mixin annotation = newMixin("Bar");

        train_findFieldsWithAnnotation(transformation, Mixin.class, "fred");
        train_getFieldAnnotation(transformation, "fred", Mixin.class, annotation);
        train_getFieldType(transformation, "fred", "foo.bar.Baz");
View Full Code Here

    public void field_with_no_specific_mixin_type()
    {
        ComponentClassResolver resolver = mockComponentClassResolver();
        ClassTransformation transformation = mockClassTransformation();
        MutableComponentModel model = mockMutableComponentModel();
        Mixin annotation = newMixin("");

        train_findFieldsWithAnnotation(transformation, Mixin.class, "fred");
        train_getFieldAnnotation(transformation, "fred", Mixin.class, annotation);
        train_getFieldType(transformation, "fred", "foo.bar.Baz");
View Full Code Here

        expect(resolver.resolveMixinTypeToClassName(mixinType)).andReturn(mixinClassName);
    }

    private Mixin newMixin(String value)
    {
        Mixin annotation = newMock(Mixin.class);

        expect(annotation.value()).andReturn(value);

        return annotation;
    }
View Full Code Here

    {
        List<String> fields = transformation.findFieldsWithAnnotation(Mixin.class);

        for (String fieldName : fields)
        {
            Mixin annotation = transformation.getFieldAnnotation(fieldName, Mixin.class);

            String mixinType = annotation.value();

            String fieldType = transformation.getFieldType(fieldName);

            String mixinClassName = InternalUtils.isBlank(mixinType) ? fieldType : _resolver
                    .resolveMixinTypeToClassName(mixinType);
View Full Code Here

    public void field_with_explicit_type()
    {
        ComponentClassResolver resolver = mockComponentClassResolver();
        ClassTransformation transformation = mockClassTransformation();
        MutableComponentModel model = mockMutableComponentModel();
        Mixin annotation = newMixin("Bar");

        train_findFieldsWithAnnotation(transformation, Mixin.class, "fred");
        train_getFieldAnnotation(transformation, "fred", Mixin.class, annotation);
        train_getFieldType(transformation, "fred", "foo.bar.Baz");
View Full Code Here

    public void field_with_no_specific_mixin_type()
    {
        ComponentClassResolver resolver = mockComponentClassResolver();
        ClassTransformation transformation = mockClassTransformation();
        MutableComponentModel model = mockMutableComponentModel();
        Mixin annotation = newMixin("");

        train_findFieldsWithAnnotation(transformation, Mixin.class, "fred");
        train_getFieldAnnotation(transformation, "fred", Mixin.class, annotation);
        train_getFieldType(transformation, "fred", "foo.bar.Baz");
View Full Code Here

        expect(resolver.resolveMixinTypeToClassName(mixinType)).andReturn(mixinClassName);
    }

    private Mixin newMixin(String value)
    {
        Mixin annotation = newMock(Mixin.class);

        expect(annotation.value()).andReturn(value);

        return annotation;
    }
View Full Code Here

TOP

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

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.