Examples of Mixin


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

Examples of org.apache.tapestry.annotations.Mixin

    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

Examples of org.apache.tapestry.annotations.Mixin

        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

Examples of org.apache.tapestry.annotations.Mixin

    {
        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

Examples of org.apache.tapestry.annotations.Mixin

    public void field_with_explicit_type()
    {
        ComponentClassResolver resolver = newComponentClassResolver();
        ClassTransformation transformation = newClassTransformation();
        MutableComponentModel model = newMutableComponentModel();
        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

Examples of org.apache.tapestry.annotations.Mixin

    public void field_with_no_specific_mixin_type()
    {
        ComponentClassResolver resolver = newComponentClassResolver();
        ClassTransformation transformation = newClassTransformation();
        MutableComponentModel model = newMutableComponentModel();
        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

Examples of org.apache.tapestry.annotations.Mixin

        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

Examples of org.apache.tapestry.annotations.Mixin

    {
        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

Examples of org.apache.tapestry5.annotations.Mixin

        }
    }

    private void replaceFieldWithMixin(MutableComponentModel model, PlasticField field)
    {
        Mixin annotation = field.getAnnotation(Mixin.class);

        field.claim(annotation);

        String mixinType = annotation.value();

        String[] order = annotation.order();

        String fieldType = field.getTypeName();

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

Examples of org.apache.tapestry5.annotations.Mixin

        }
    }

    private void replaceFieldWithMixin(MutableComponentModel model, TransformField field)
    {
        Mixin annotation = field.getAnnotation(Mixin.class);

        field.claim(annotation);

        String mixinType = annotation.value();

        String[] order = annotation.order();

        String fieldType = field.getType();

        String mixinClassName = InternalUtils.isBlank(mixinType) ? fieldType : resolver
                .resolveMixinTypeToClassName(mixinType);
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.