Package org.apache.isis.core.metamodel.facets.describedas

Examples of org.apache.isis.core.metamodel.facets.describedas.DescribedAsFacet


            }
        }

        // otherwise, fall back to a description on the parameter's type, if
        // available
        final DescribedAsFacet parameterTypeDescribedAsFacet = getDescribedAsFacet(parameterType);
        if (parameterTypeDescribedAsFacet != null) {
            FacetUtil.addFacet(new DescribedAsFacetForParameterDerivedFromType(parameterTypeDescribedAsFacet, processParameterContext.getFacetHolder()));
            return;
        }
View Full Code Here


    @Override
    public void process(final ProcessMethodContext processMethodContext) {

        // look for annotation on the property
        final DescribedAs annotation = getAnnotation(processMethodContext.getMethod(), DescribedAs.class);
        DescribedAsFacet facet = create(annotation, processMethodContext.getFacetHolder());
        if (facet != null) {
            FacetUtil.addFacet(facet);
            return;
        }

        // otherwise, look for annotation on the type
        final Class<?> returnType = processMethodContext.getMethod().getReturnType();
        final DescribedAsFacet returnTypeDescribedAsFacet = getDescribedAsFacet(returnType);
        if (returnTypeDescribedAsFacet != null) {
            facet = new DescribedAsFacetForMemberDerivedFromType(returnTypeDescribedAsFacet, processMethodContext.getFacetHolder());
            FacetUtil.addFacet(facet);
        }
    }
View Full Code Here

        return name + " " + (indexOf + 1);
    }

    @Override
    public String getDescription() {
        final DescribedAsFacet facet = getFacet(DescribedAsFacet.class);
        final String description = facet.value();
        return description == null ? "" : description;
    }
View Full Code Here

     * Expect to be populated using {@link #setDescribedAs(String)} but has
     * default name as well.
     */
    @Override
    public String getDescription() {
        final DescribedAsFacet describedAsFacet = getFacet(DescribedAsFacet.class);
        final String describedAs = describedAsFacet.value();
        return describedAs == null ? "" : describedAs;
    }
View Full Code Here

        return name != null ? name : defaultName;
    }

    @Override
    public String getDescription() {
        final DescribedAsFacet facet = getFacet(DescribedAsFacet.class);
        return facet.value();
    }
View Full Code Here

    /**
     * Expect to be populated using {@link #setDescribedAs(String)} but has default name as well.
     */
    @Override
    public String getDescription() {
        final DescribedAsFacet describedAsFacet = getFacet(DescribedAsFacet.class);
        final String describedAs = describedAsFacet.value();
        return describedAs == null ? "" : describedAs;
    }
View Full Code Here

    @Override
    public void process(final ProcessMethodContext processMethodContext) {

        // look for annotation on the property
        final DescribedAs annotation = getAnnotation(processMethodContext.getMethod(), DescribedAs.class);
        DescribedAsFacet facet = create(annotation, processMethodContext.getFacetHolder());
        if (facet != null) {
            FacetUtil.addFacet(facet);
            return;
        }

        // otherwise, look for annotation on the type
        final Class<?> returnType = processMethodContext.getMethod().getReturnType();
        final DescribedAsFacet returnTypeDescribedAsFacet = getDescribedAsFacet(returnType);
        if (returnTypeDescribedAsFacet != null) {
            facet =
                new DescribedAsFacetForMemberDerivedFromType(returnTypeDescribedAsFacet,
                    processMethodContext.getFacetHolder());
            FacetUtil.addFacet(facet);
View Full Code Here

                return;
            }
        }

        // otherwise, fall back to a description on the parameter's type, if available
        final DescribedAsFacet parameterTypeDescribedAsFacet = getDescribedAsFacet(parameterType);
        if (parameterTypeDescribedAsFacet != null) {
            FacetUtil.addFacet(new DescribedAsFacetForParameterDerivedFromType(parameterTypeDescribedAsFacet,
                processParameterContext.getFacetHolder()));
            return;
        }
View Full Code Here

        return name + " " + (indexOf + 1);
    }

    @Override
    public String getDescription() {
        final DescribedAsFacet facet = getFacet(DescribedAsFacet.class);
        final String description = facet.value();
        return description == null ? "" : description;
    }
View Full Code Here

        return name != null ? name : defaultName;
    }

    @Override
    public String getDescription() {
        final DescribedAsFacet facet = getFacet(DescribedAsFacet.class);
        return facet.value();
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.core.metamodel.facets.describedas.DescribedAsFacet

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.