Examples of TypeOfFacetInferredFromGenerics


Examples of org.apache.isis.core.metamodel.facets.typeof.TypeOfFacetInferredFromGenerics

        facetFactory.process(new ProcessMethodContext(Customer.class, actionMethod, methodRemover, facetedMethod));

        final Facet facet = facetedMethod.getFacet(TypeOfFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof TypeOfFacetInferredFromGenerics);
        final TypeOfFacetInferredFromGenerics typeOfFacetInferredFromGenerics = (TypeOfFacetInferredFromGenerics) facet;
        assertEquals(Order.class, typeOfFacetInferredFromGenerics.value());

    }
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.typeof.TypeOfFacetInferredFromGenerics

        facetFactory.process(new ProcessMethodContext(Customer.class, collectionAccessorMethod, methodRemover, facetedMethod));

        final Facet facet = facetedMethod.getFacet(TypeOfFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof TypeOfFacetInferredFromGenerics);
        final TypeOfFacetInferredFromGenerics typeOfFacetInferredFromGenerics = (TypeOfFacetInferredFromGenerics) facet;
        assertEquals(Order.class, typeOfFacetInferredFromGenerics.value());

    }
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.typeof.TypeOfFacetInferredFromGenerics

        }

        final Object actualTypeArgument = actualTypeArguments[0];
        if (actualTypeArgument instanceof Class) {
            final Class<?> actualType = (Class<?>) actualTypeArgument;
            FacetUtil.addFacet(new TypeOfFacetInferredFromGenerics(actualType, processMethodContext.getFacetHolder(), getSpecificationLookup()));
            return;
        }

        if (actualTypeArgument instanceof TypeVariable) {
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.typeof.TypeOfFacetInferredFromGenerics

    private void processCollectionType(final ProcessClassContext processClassContaxt) {
        final FacetHolder facetHolder = processClassContaxt.getFacetHolder();
        final TypeOfFacet typeOfFacet = facetHolder.getFacet(TypeOfFacet.class);
        if (typeOfFacet == null) {
            final Class<?> collectionElementType = collectionElementType(processClassContaxt.getCls());
            facetHolder.addFacet(collectionElementType != Object.class ? new TypeOfFacetInferredFromGenerics(collectionElementType, facetHolder, getSpecificationLookup()) : new TypeOfFacetDefaultToObject(facetHolder, getSpecificationLookup()));
        } else {
            // nothing
        }
        facetHolder.addFacet(new JavaCollectionFacet(facetHolder, getAdapterMap()));
        return;
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.typeof.TypeOfFacetInferredFromGenerics

        }

        final Object actualTypeArgument = actualTypeArguments[0];
        if (actualTypeArgument instanceof Class) {
            final Class<?> actualType = (Class<?>) actualTypeArgument;
            FacetUtil.addFacet(new TypeOfFacetInferredFromGenerics(actualType, processMethodContext.getFacetHolder(), getSpecificationLookup()));
            return;
        }

        if (actualTypeArgument instanceof TypeVariable) {
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.typeof.TypeOfFacetInferredFromGenerics

        }

        final Object actualTypeArgument = actualTypeArguments[0];
        if (actualTypeArgument instanceof Class) {
            final Class<?> actualType = (Class<?>) actualTypeArgument;
            FacetUtil.addFacet(new TypeOfFacetInferredFromGenerics(actualType, processMethodContext.getFacetHolder(),
                getSpecificationLookup()));
            return;
        }

        if (actualTypeArgument instanceof TypeVariable) {
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.typeof.TypeOfFacetInferredFromGenerics

        }

        final Object actualTypeArgument = actualTypeArguments[0];
        if (actualTypeArgument instanceof Class) {
            final Class<?> actualType = (Class<?>) actualTypeArgument;
            FacetUtil.addFacet(new TypeOfFacetInferredFromGenerics(actualType, processMethodContext.getFacetHolder(),
                getSpecificationLookup()));
            return;
        }

        if (actualTypeArgument instanceof TypeVariable) {
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.typeof.TypeOfFacetInferredFromGenerics

    private void processCollectionType(final ProcessClassContext processClassContaxt) {
        final FacetHolder facetHolder = processClassContaxt.getFacetHolder();
        final TypeOfFacet typeOfFacet = facetHolder.getFacet(TypeOfFacet.class);
        if (typeOfFacet == null) {
            final Class<?> collectionElementType = collectionElementType(processClassContaxt.getCls());
            facetHolder.addFacet(collectionElementType != Object.class ? new TypeOfFacetInferredFromGenerics(
                collectionElementType, facetHolder, getSpecificationLookup()) : new TypeOfFacetDefaultToObject(
                facetHolder, getSpecificationLookup()));
        } else {
            // nothing
        }
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.typeof.TypeOfFacetInferredFromGenerics

    private void processCollectionType(final ProcessClassContext processClassContaxt) {
        final FacetHolder facetHolder = processClassContaxt.getFacetHolder();
        final TypeOfFacet typeOfFacet = facetHolder.getFacet(TypeOfFacet.class);
        if (typeOfFacet == null) {
            final Class<?> collectionElementType = collectionElementType(processClassContaxt.getCls());
            facetHolder.addFacet(collectionElementType != Object.class ? new TypeOfFacetInferredFromGenerics(collectionElementType, facetHolder, getSpecificationLoader()) : new TypeOfFacetDefaultToObject(facetHolder, getSpecificationLoader()));
        } else {
            // nothing
        }
        facetHolder.addFacet(new JavaCollectionFacet(facetHolder, getAdapterManager()));
        return;
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.typeof.TypeOfFacetInferredFromGenerics

        }

        final Object actualTypeArgument = actualTypeArguments[0];
        if (actualTypeArgument instanceof Class) {
            final Class<?> actualType = (Class<?>) actualTypeArgument;
            FacetUtil.addFacet(new TypeOfFacetInferredFromGenerics(actualType, processMethodContext.getFacetHolder(), getSpecificationLoader()));
            return;
        }

        if (actualTypeArgument instanceof TypeVariable) {
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.