/** * Helps in the search for the {@link ImmutableClassType} that fit the given * {@link AbstractClassSensorAssignment}. * <p> * Search order is following: * <p> * 1. If direct class/interface/super-class name is given, then by name <br> * 2. If annotation is given, then by annotation<br> * 3. If nothing of above, then by the wild card name search. * * @param classCache * {@link ClassCache} to look in. * @param classSensorAssignment * {@link AbstractClassSensorAssignment} * @return All initialized {@link ImmutableClassType} that might match given * {@link AbstractClassSensorAssignment}. Note that this is only narrow process, full * check must be performed on the returned results. */ public Collection<? extends ImmutableClassType> narrowByClassSensorAssignment(ClassCache classCache, AbstractClassSensorAssignment<?> classSensorAssignment) { if (!WildcardMatchPattern.isPattern(classSensorAssignment.getClassName())) { // if we don't have a pattern that just load return narrowByNameSearch(classCache, classSensorAssignment.getClassName(), classSensorAssignment.isInterf(), classSensorAssignment.isSuperclass()); } if (null != classSensorAssignment.getAnnotation()) { return narrowByAnnotationSearch(classCache, classSensorAssignment.getAnnotation()); } // if nothing works then we have wild-card search in name return narrowByNameSearch(classCache, classSensorAssignment.getClassName(), classSensorAssignment.isInterf(), classSensorAssignment.isSuperclass()); }