JavaSourceFacet javaSource = project.getFacet(JavaSourceFacet.class);
RestResourceTypeVisitor restTypeVisitor = new RestResourceTypeVisitor();
String entityTable = getEntityTable(klass);
String proposedResourcePath = "/" + inflector.pluralize(entityTable.toLowerCase());
restTypeVisitor.setProposedPath(proposedResourcePath);
javaSource.visitJavaSources(restTypeVisitor);
if (restTypeVisitor.isFound())
{
entitiesWithRestResources.add(klass.getQualifiedName());
}
}