Package org.apache.isis.core.metamodel.facets.param.typicallen.annotation

Examples of org.apache.isis.core.metamodel.facets.param.typicallen.annotation.TypicalLengthFacetOnParameterAnnotationFactory


        final TypicalLengthFacetOnPropertyAnnotation typicalLengthFacetAnnotation = (TypicalLengthFacetOnPropertyAnnotation) facet;
        assertEquals(30, typicalLengthFacetAnnotation.value());
    }

    public void testTypicalLengthAnnotationPickedUpOnActionParameter() {
        final TypicalLengthFacetOnParameterAnnotationFactory facetFactory = new TypicalLengthFacetOnParameterAnnotationFactory();

        class Customer {
            @SuppressWarnings("unused")
            public void someAction(@TypicalLength(20) final int foo) {
            }
        }
        final Method method = findMethod(Customer.class, "someAction", new Class[] { int.class });

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

        final Facet facet = facetedMethodParameter.getFacet(TypicalLengthFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof TypicalLengthFacetOnParameterAnnotation);
        final TypicalLengthFacetOnParameterAnnotation typicalLengthFacetAnnotation = (TypicalLengthFacetOnParameterAnnotation) facet;
View Full Code Here

TOP

Related Classes of org.apache.isis.core.metamodel.facets.param.typicallen.annotation.TypicalLengthFacetOnParameterAnnotationFactory

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.