/** * Tests if the given {@link ImmutableClassType} matches the class sensor assignment. This * method allows option for non-checking the annotation, which can be helpful with method sensor * assignments as the annotation matching must be also done on the method level. * * @param classSensorAssignment * assignment. * @param classType * classType * @param checkAnnotation * if annotation matching has to be checked on the {@link ClassType} * @return <code>true</code> if class type matches the assignment. */ public boolean matches(AbstractClassSensorAssignment<?> classSensorAssignment, ImmutableClassType classType, boolean checkAnnotation) { if (!matchesClassName(classSensorAssignment, classType)) { return false; } if (checkAnnotation && !matchesAnnotation(classSensorAssignment, classType)) { return false; } return true; }