class VariableNameFilter 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 VariableViolation) {
            return variableName.equalsIgnoreCase(((VariableViolation) violation).getVariableName());
        }

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

    public  VariableNameFilter(final String variableName);

}