class NotContributedFacetDerivedFromDomainServiceFacetFactory extends FacetFactoryAbstract {

    @Override
    public void process(final ProcessMethodContext processMethodContext) {
        final Method method = processMethodContext.getMethod();
        final Class<?> declaringClass = method.getDeclaringClass();
        final ObjectSpecification spec = getSpecificationLoader().loadSpecification(declaringClass);

        final DomainServiceFacet domainServiceFacet = spec.getFacet(DomainServiceFacet.class);
        if(domainServiceFacet == null || domainServiceFacet.isFallback()) {
            return;
        }

        final NatureOfService natureOfService = domainServiceFacet.getNatureOfService();
        if(natureOfService == NatureOfService.VIEW) {
            return;
        }

        final FacetedMethod facetHolder = processMethodContext.getFacetHolder();
        FacetUtil.addFacet(new NotContributedFacetDerivedFromDomainServiceFacet(natureOfService, facetHolder));
    }

    public  NotContributedFacetDerivedFromDomainServiceFacetFactory();

}