class SubroutineNameFilter extends AbstractPropertyReflectingFilter {

    @Override
    public boolean exclude(final String scriptName, final Violation violation) {
        if (scriptName == null) {
            throw new IllegalArgumentException("Script name cannot be null.");
        }

        if (violation == null) {
            throw new IllegalArgumentException("Violation cannot be null.");
        }

        if (violation instanceof SubroutineViolation) {
            return subroutineName.equalsIgnoreCase(((SubroutineViolation) violation).getSubroutineName());
        }

        final String internalValue = getInternalValue(violation, "subroutineName");
        return subroutineName.equalsIgnoreCase(internalValue);
    }

    public  SubroutineNameFilter(final String subroutineName);

}