code: public boolean matches(T target) {
          TypeDefinition declaringType = target.getDeclaringType();
          return declaringType != null && matcher.matches(declaringType.asGenericType());
      }
docs: {@inheritDoc}