@SuppressWarnings("unchecked")
private Map<PolicyType, List<Class<? extends Policy>>> getPolicyInterfacesByType(final Class<?> clazz) {
final Map<PolicyType, List<Class<? extends Policy>>> policyInterfacesByType = new HashMap<PolicyType, List<Class<? extends Policy>>>();
for (final Class<?> interfaceClass : clazz.getInterfaces()) {
PolicyType policyType = null;
if (org.alfresco.repo.policy.ClassPolicy.class.isAssignableFrom(interfaceClass)) {
policyType = PolicyType.Class;
} else if (org.alfresco.repo.policy.AssociationPolicy.class.isAssignableFrom(interfaceClass)) {
policyType = PolicyType.Association;
} else if (org.alfresco.repo.policy.PropertyPolicy.class.isAssignableFrom(interfaceClass)) {