/** * Check if the class type or any of its super-classes matches the given name pattern. * * @param classType * Type to check. * @param namePattern * Pattern to test FQN with. * @return <code>true</code> if class or any of the super-classes match the name pattern. */ private boolean checkClassAndSuperClassForName(ImmutableClassType classType, IMatchPattern namePattern) { if (namePattern.match(classType.getFQN())) { return true; } for (ImmutableClassType superClassType : classType.getImmutableSuperClasses()) { if (checkClassAndSuperClassForName(superClassType, namePattern)) { return true; } } return false; }
if (checkClassAndSuperClassForName(superClassType, pattern)) { return true;