001/*-----------------------------------------------------------------------+ 002 | com.teamscale.checks 003 | | 004 $Id$ 005 | | 006 | Copyright (c) 2009-2015 CQSE GmbH | 007 +-----------------------------------------------------------------------*/ 008package eu.cqse.check.framework.core.xpath.functions; 009 010import org.conqat.lib.commons.assertion.CCSMAssert; 011 012/** 013 * Base class for functions that use modifiers for node selection. 014 */ 015public abstract class ModifierSelectionFunctionBase extends TokenFunctionBase { 016 017 /** The function's name. */ 018 private final String name; 019 020 /** Constructor. */ 021 public ModifierSelectionFunctionBase(String name) { 022 CCSMAssert.isNotNull(name); 023 this.name = name; 024 } 025 026 /** {@inheritDoc} */ 027 @Override 028 protected String getArgumentSizeInvalidErrorMessage() { 029 return name + "(modifier,[modifier]*) expects at least one argument."; 030 } 031}