class CompositeKeyGeneratorWithoutLast extends CompositeKeyGenerator {

    @Override
    public Object generate(Object target, Method method, Object... params) {
        if (params.length == 0) throw new IllegalArgumentException("At least one argument with value is required");
        return super.generate(target, method, Arrays.copyOf(params, params.length - 1));
    }

}