private void addPolicies(AbstractServiceFactoryBean factory, InterfaceInfo ii, Class<?> cls) {
if (cls == null) {
return;
}
Policy p = cls.getAnnotation(Policy.class);
Policies ps = cls.getAnnotation(Policies.class);
if (p != null || ps != null) {
List<Policy> list = new ArrayList<Policy>();
if (p != null) {
list.add(p);
}
if (ps != null) {
list.addAll(Arrays.asList(ps.value()));
}
ListIterator<Policy> it = list.listIterator();
while (it.hasNext()) {
p = it.next();
Policy.Placement place = p.placement();