use of org.qi4j.api.association.NamedAssociation in project qi4j-sdk by Qi4j.
the class MethodFinder method doFilter.
/**
* Do the filter for method return type (Property, Association, ManyAssociation, NamedAssociation)
* by removing the entry from the list.
*
* @param list list of CompositeMethodDetailDescriptor
*/
private void doFilter(List<CompositeMethodDetailDescriptor> list) {
if (list.isEmpty()) {
return;
}
Iterator<CompositeMethodDetailDescriptor> iter = list.iterator();
while (iter.hasNext()) {
CompositeMethodDetailDescriptor descriptor = iter.next();
Method method = descriptor.descriptor().method();
if (Property.class.isAssignableFrom(method.getReturnType())) {
iter.remove();
} else if (Association.class.isAssignableFrom(method.getReturnType())) {
iter.remove();
} else if (ManyAssociation.class.isAssignableFrom(method.getReturnType())) {
iter.remove();
} else if (NamedAssociation.class.isAssignableFrom(method.getReturnType())) {
iter.remove();
}
}
}
Aggregations