// Path: src/main/java/com/github/jankroken/commandline/domain/InternalErrorException.java
// public class InternalErrorException extends CommandLineException {
//     private static final long serialVersionUID = 2L;
// 
//     public InternalErrorException(String message) {
//         super(message);
//     }
// }
// 
// Path: src/main/java/com/github/jankroken/commandline/domain/InvalidCommandLineException.java
// public class InvalidCommandLineException extends CommandLineException {
//     private static final long serialVersionUID = 2L;
// 
//     public InvalidCommandLineException(String message) {
//         super(message);
//     }
// }
// 
// Path: src/main/java/com/github/jankroken/commandline/domain/InvalidOptionConfigurationException.java
// public class InvalidOptionConfigurationException extends CommandLineException {
//     private static final long serialVersionUID = 2L;
// 
//     public InvalidOptionConfigurationException(String message) {
//         super(message);
//     }
// }


import com.github.jankroken.commandline.domain.InternalErrorException;
import com.github.jankroken.commandline.domain.InvalidCommandLineException;
import com.github.jankroken.commandline.domain.InvalidOptionConfigurationException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
                handleArguments(subset);
                break;
            case LOOSE_ARGS:
                handleArguments(args.next().getValue());
                break;
            default:
                throw createInternalErrorException("Not implemented: " + argumentConsumption.getType());
        }
    }

    private void handleArguments(Object args)
            throws IllegalArgumentException, IllegalAccessException, InvocationTargetException {
        if (occurrences == Occurrences.SINGLE) {
            method.invoke(spec, args);
        } else {
            argumentBuffer.add(args);
        }
    }


    public void flush()
            throws IllegalArgumentException, IllegalAccessException, InvocationTargetException {
        if (required && !activated) {
            throw createInvalidCommandLineException("Required argument not specified");
        }
        if (occurrences == Occurrences.MULTIPLE) {
            method.invoke(spec, argumentBuffer);
        }
    }

// Path: src/main/java/com/github/jankroken/commandline/domain/InternalErrorException.java
// public class InternalErrorException extends CommandLineException {
//     private static final long serialVersionUID = 2L;
// 
//     public InternalErrorException(String message) {
//         super(message);
//     }
// }
// 
// Path: src/main/java/com/github/jankroken/commandline/domain/InvalidCommandLineException.java
// public class InvalidCommandLineException extends CommandLineException {
//     private static final long serialVersionUID = 2L;
// 
//     public InvalidCommandLineException(String message) {
//         super(message);
//     }
// }
// 
// Path: src/main/java/com/github/jankroken/commandline/domain/InvalidOptionConfigurationException.java
// public class InvalidOptionConfigurationException extends CommandLineException {
//     private static final long serialVersionUID = 2L;
// 
//     public InvalidOptionConfigurationException(String message) {
//         super(message);
//     }
// }


// Path: src/main/java/com/github/jankroken/commandline/domain/internal/OptionSpecification.java
import com.github.jankroken.commandline.domain.InternalErrorException;
import com.github.jankroken.commandline.domain.InvalidCommandLineException;
import com.github.jankroken.commandline.domain.InvalidOptionConfigurationException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

                handleArguments(subset);
                break;
            case LOOSE_ARGS:
                handleArguments(args.next().getValue());
                break;
            default:
                throw createInternalErrorException("Not implemented: " + argumentConsumption.getType());
        }
    }

    private void handleArguments(Object args)
            throws IllegalArgumentException, IllegalAccessException, InvocationTargetException {
        if (occurrences == Occurrences.SINGLE) {
            method.invoke(spec, args);
        } else {
            argumentBuffer.add(args);
        }
    }


    public void flush()
            throws IllegalArgumentException, IllegalAccessException, InvocationTargetException {
        if (required && !activated) {
            throw createInvalidCommandLineException("Required argument not specified");
        }
        if (occurrences == Occurrences.MULTIPLE) {
            method.invoke(spec, argumentBuffer);
        }
    }

    private InvalidOptionConfigurationException createInvalidOptionSpecificationException(String description) {