Examples of MixinClasses


Examples of org.apache.tapestry.annotations.MixinClasses

    }

    private void addMixinClasses(String fieldName, ClassTransformation transformation,
            MutableEmbeddedComponentModel model)
    {
        MixinClasses annotation = transformation.getFieldAnnotation(fieldName, MixinClasses.class);

        if (annotation == null)
            return;

        for (Class c : annotation.value())
            model.addMixin(c.getName());
    }
View Full Code Here

Examples of org.apache.tapestry.annotations.MixinClasses

    }

    private void addMixinClasses(String fieldName, ClassTransformation transformation,
            MutableEmbeddedComponentModel model)
    {
        MixinClasses annotation = transformation.getFieldAnnotation(fieldName, MixinClasses.class);

        if (annotation == null)
            return;

        for (Class c : annotation.value())
            model.addMixin(c.getName());
    }
View Full Code Here

Examples of org.apache.tapestry.annotations.MixinClasses

    }

    private void addMixinClasses(String fieldName, ClassTransformation transformation,
                                 MutableEmbeddedComponentModel model)
    {
        MixinClasses annotation = transformation.getFieldAnnotation(fieldName, MixinClasses.class);

        if (annotation == null) return;

        for (Class c : annotation.value())
            model.addMixin(c.getName());
    }
View Full Code Here

Examples of org.apache.tapestry.annotations.MixinClasses

    }

    private void addMixinClasses(String fieldName, ClassTransformation transformation,
            MutableEmbeddedComponentModel model)
    {
        MixinClasses annotation = transformation.getFieldAnnotation(fieldName, MixinClasses.class);

        if (annotation == null) return;

        for (Class c : annotation.value())
            model.addMixin(c.getName());
    }
View Full Code Here

Examples of org.apache.tapestry.annotations.MixinClasses

    }

    private void addMixinClasses(String fieldName, ClassTransformation transformation,
                                 MutableEmbeddedComponentModel model)
    {
        MixinClasses annotation = transformation.getFieldAnnotation(fieldName, MixinClasses.class);

        if (annotation == null) return;

        for (Class c : annotation.value())
            model.addMixin(c.getName());
    }
View Full Code Here

Examples of org.apache.tapestry.annotations.MixinClasses

    }

    private void addMixinClasses(String fieldName, ClassTransformation transformation,
                                 MutableEmbeddedComponentModel model)
    {
        MixinClasses annotation = transformation.getFieldAnnotation(fieldName, MixinClasses.class);

        if (annotation == null) return;

        for (Class c : annotation.value())
            model.addMixin(c.getName());
    }
View Full Code Here

Examples of org.apache.tapestry5.annotations.MixinClasses

    }

    private void addMixinClasses(PlasticField field, MutableEmbeddedComponentModel model)
    {
        MixinClasses annotation = field.getAnnotation(MixinClasses.class);

        if (annotation == null)
            return;

        boolean orderEmpty = annotation.order().length == 0;

        if (!orderEmpty && annotation.order().length != annotation.value().length)
            throw new TapestryException(TransformMessages.badMixinConstraintLength(annotation, field.getName()), model,
                    null);

        for (int i = 0; i < annotation.value().length; i++)
        {
            String[] constraints = orderEmpty ? InternalConstants.EMPTY_STRING_ARRAY : TapestryInternalUtils
                    .splitMixinConstraints(annotation.order()[i]);

            model.addMixin(annotation.value()[i].getName(), constraints);
        }
    }
View Full Code Here

Examples of org.apache.tapestry5.annotations.MixinClasses

            embedded.setPublishedParameters(CollectionFactory.newList(TapestryInternalUtils.splitAtCommas(names)));
    }

    private void addMixinClasses(TransformField field, MutableEmbeddedComponentModel model)
    {
        MixinClasses annotation = field.getAnnotation(MixinClasses.class);

        if (annotation == null)
            return;

        boolean orderEmpty = annotation.order().length == 0;

        if (!orderEmpty && annotation.order().length != annotation.value().length)
            throw new TapestryException(TransformMessages.badMixinConstraintLength(annotation, field.getName()), model,
                    null);

        for (int i = 0; i < annotation.value().length; i++)
        {
            String[] constraints = orderEmpty ? InternalConstants.EMPTY_STRING_ARRAY : TapestryInternalUtils
                    .splitMixinConstraints(annotation.order()[i]);

            model.addMixin(annotation.value()[i].getName(), constraints);
        }
    }
View Full Code Here

Examples of org.apache.tapestry5.annotations.MixinClasses

    }

    private void addMixinClasses(String fieldName, ClassTransformation transformation,
                                 MutableEmbeddedComponentModel model)
    {
        MixinClasses annotation = transformation.getFieldAnnotation(fieldName, MixinClasses.class);

        if (annotation == null) return;

        for (Class c : annotation.value())
            model.addMixin(c.getName());
    }
View Full Code Here

Examples of org.apache.tapestry5.annotations.MixinClasses

    }

    private void addMixinClasses(PlasticField field, MutableEmbeddedComponentModel model)
    {
        MixinClasses annotation = field.getAnnotation(MixinClasses.class);

        if (annotation == null)
            return;

        boolean orderEmpty = annotation.order().length == 0;

        if (!orderEmpty && annotation.order().length != annotation.value().length)
            throw new TapestryException(String.format("%d mixins defined via @MixinClasses on field '%s', but %d ordering constraints \\\n" +
                    " specified (expected 0 or %1$d).", annotation.value().length, field.getName(), annotation.order().length), model,
                    null);

        for (int i = 0; i < annotation.value().length; i++)
        {
            String[] constraints = orderEmpty ? InternalConstants.EMPTY_STRING_ARRAY : TapestryInternalUtils
                    .splitMixinConstraints(annotation.order()[i]);

            model.addMixin(annotation.value()[i].getName(), constraints);
        }
    }
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.