Examples of LabelAtFacetOnParameterAnnotationFactory


Examples of org.apache.isis.core.metamodel.facets.param.labelat.annotation.LabelAtFacetOnParameterAnnotationFactory

        final LabelAtFacetOnPropertyAnnotation labelAtFacetAnnotation = (LabelAtFacetOnPropertyAnnotation) facet;
        assertEquals(LabelAt.Position.LEFT, labelAtFacetAnnotation.value());
    }

    public void testLabelAtAnnotationPickedUpOnActionParameter() {
        final LabelAtFacetOnParameterAnnotationFactory facetFactory = new LabelAtFacetOnParameterAnnotationFactory();

        class Customer {
            @SuppressWarnings("unused")
            public void someAction(@LabelAt(LabelAt.Position.LEFT) final String foo) {
            }
        }
        final Method method = findMethod(Customer.class, "someAction", new Class[] { String.class });

        facetFactory.processParams(new ProcessParameterContext(method, 0, facetedMethodParameter));

        final Facet facet = facetedMethodParameter.getFacet(LabelAtFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof LabelAtFacetOnParameterAnnotation);
        final LabelAtFacetOnParameterAnnotation labelAtFacetAnnotation = (LabelAtFacetOnParameterAnnotation) facet;
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.