private static List < ClassNode > keepLowestCommonInterfaces ( List < ClassNode > fromA , List < ClassNode > fromB ) { if ( fromA == null || fromB == null ) return EMPTY_CLASSNODE_LIST ; Set < ClassNode > common = new HashSet < ClassNode > ( fromA ) ; common . retainAll ( fromB ) ; List < ClassNode > result = new ArrayList < ClassNode > ( common . size ( ) ) ; for ( ClassNode classNode : common ) { addMostSpecificInterface ( classNode , result ) ; } return result ; }
Given the list of interfaces implemented by two class nodes returns the list of the most specific common implemented interfaces .