class ActorsProcessor extends AbstractProcessor {

    @VisibleForTesting
    /* package */ boolean validateModel(@NotNull ActorParsedModel model) {
        boolean result = true;

        if (model.collectInterfaces) {
            for (ActorInterfaceDescription _interface : model.interfaces) {
                if (!_interface.validate()) {
                    _interface.describeProblems(model.errors);
                    result = false;
                }
            }
        }

        if (!model.collectInterfaces || model.collectPackages) {
            int packages = 0;
            for (ActorsPackageDescription _package : model.packages) {
                if (!_package.validate()) {
                    _package.describeProblems(model.errors);
                } else {
                    ++packages;
                }
            }

            switch (packages) {
                case 0:
                    model.errors.add(new GenerationError(GenerationError.ER0010));
                    result = false;
                    break;
                case 1:
                    break;
                default:
                    model.errors.add(new GenerationError(GenerationError.ER0009));
                    result = false;
                    break;
            }
        }

        return result;
    }

    @SuppressWarnings("unused") public  ActorsProcessor();
    @VisibleForTesting  ActorsProcessor(@NotNull ModelFactory modelFactory);

}