public static void main(String[] args) throws IOException, ClassNotFoundException {
    """
	Usage: java HollowAPIGenerator --argName1=argValue1 --argName2==argValue2. See {@link GeneratorArguments} for
	available arguments.
	@param args the arguments
	@throws IOException if a schema could not be read or the data model written
	@throws ClassNotFoundException if a class of a data model cannot be loaded
    """
        if (args.length == 0) {
            System.out.println("Usage:\n"
                    + "java " + HollowAPIGenerator.class.getName() + " --arg1=value1 --arg2=value2\n"
                    + "see " + GeneratorArguments.class.getName() + " for available arguments.");
            return;
        }
        HollowWriteStateEngine engine = new HollowWriteStateEngine();
        HollowAPIGenerator.Builder builder = new HollowAPIGenerator.Builder();
        HollowObjectMapper mapper = new HollowObjectMapper(engine);
        ArgumentParser<GeneratorArguments> argumentParser = new ArgumentParser(GeneratorArguments.class, args);
        for (ArgumentParser<GeneratorArguments>.ParsedArgument arg : argumentParser.getParsedArguments()) {
            switch (arg.getKey()) {
                case addToDataModel:
                    mapper.initializeTypeState(HollowAPIGenerator.class.getClassLoader().loadClass(arg.getValue()));
                    break;
                case addSchemaFileToDataModel:
                    HollowWriteStateCreator.readSchemaFileIntoWriteState(arg.getValue(), engine);
                    break;
                case apiClassName:
                    builder.withAPIClassname(arg.getValue());
                    break;
                case classPostfix:
                    builder.withClassPostfix(arg.getValue());
                    break;
                case getterPrefix:
                    builder.withGetterPrefix(arg.getValue());
                    break;
                case packageName:
                    builder.withPackageName(arg.getValue());
                    break;
                case pathToGeneratedFiles:
                    builder.withDestination(arg.getValue());
                    break;
                case parameterizeAllClassNames:
                    builder.withParameterizeAllClassNames(Boolean.valueOf(arg.getValue()));
                    break;
                default:
                    throw new IllegalArgumentException("Unhandled argument " + arg.getKey());
            }
        }
        builder.withDataModel(engine).build().generateSourceFiles();
    }
public static void main(String[] args) throws IOException, ClassNotFoundException {
        if (args.length == 0) {
            System.out.println("Usage:\n"
                    + "java " + HollowAPIGenerator.class.getName() + " --arg1=value1 --arg2=value2\n"
                    + "see " + GeneratorArguments.class.getName() + " for available arguments.");
            return;
        }
        HollowWriteStateEngine engine = new HollowWriteStateEngine();
        HollowAPIGenerator.Builder builder = new HollowAPIGenerator.Builder();
        HollowObjectMapper mapper = new HollowObjectMapper(engine);
        ArgumentParser<GeneratorArguments> argumentParser = new ArgumentParser(GeneratorArguments.class, args);
        for (ArgumentParser<GeneratorArguments>.ParsedArgument arg : argumentParser.getParsedArguments()) {
            switch (arg.getKey()) {
                case addToDataModel:
                    mapper.initializeTypeState(HollowAPIGenerator.class.getClassLoader().loadClass(arg.getValue()));
                    break;
                case addSchemaFileToDataModel:
                    HollowWriteStateCreator.readSchemaFileIntoWriteState(arg.getValue(), engine);
                    break;
                case apiClassName:
                    builder.withAPIClassname(arg.getValue());
                    break;
                case classPostfix:
                    builder.withClassPostfix(arg.getValue());
                    break;
                case getterPrefix:
                    builder.withGetterPrefix(arg.getValue());
                    break;
                case packageName:
                    builder.withPackageName(arg.getValue());
                    break;
                case pathToGeneratedFiles:
                    builder.withDestination(arg.getValue());
                    break;
                case parameterizeAllClassNames:
                    builder.withParameterizeAllClassNames(Boolean.valueOf(arg.getValue()));
                    break;
                default:
                    throw new IllegalArgumentException("Unhandled argument " + arg.getKey());
            }
        }
        builder.withDataModel(engine).build().generateSourceFiles();
    }
public static void main ( String [ ] args ) throws IOException , ClassNotFoundException { if ( args . length == 0 ) { System . out . println ( "Usage:\n" + "java " + HollowAPIGenerator . class . getName ( ) + " --arg1=value1 --arg2=value2\n" + "see " + GeneratorArguments . class . getName ( ) + " for available arguments." ) ; return ; } HollowWriteStateEngine engine = new HollowWriteStateEngine ( ) ; HollowAPIGenerator . Builder builder = new HollowAPIGenerator . Builder ( ) ; HollowObjectMapper mapper = new HollowObjectMapper ( engine ) ; ArgumentParser < GeneratorArguments > argumentParser = new ArgumentParser ( GeneratorArguments . class , args ) ; for ( ArgumentParser < GeneratorArguments > . ParsedArgument arg : argumentParser . getParsedArguments ( ) ) { switch ( arg . getKey ( ) ) { case addToDataModel : mapper . initializeTypeState ( HollowAPIGenerator . class . getClassLoader ( ) . loadClass ( arg . getValue ( ) ) ) ; break ; case addSchemaFileToDataModel : HollowWriteStateCreator . readSchemaFileIntoWriteState ( arg . getValue ( ) , engine ) ; break ; case apiClassName : builder . withAPIClassname ( arg . getValue ( ) ) ; break ; case classPostfix : builder . withClassPostfix ( arg . getValue ( ) ) ; break ; case getterPrefix : builder . withGetterPrefix ( arg . getValue ( ) ) ; break ; case packageName : builder . withPackageName ( arg . getValue ( ) ) ; break ; case pathToGeneratedFiles : builder . withDestination ( arg . getValue ( ) ) ; break ; case parameterizeAllClassNames : builder . withParameterizeAllClassNames ( Boolean . valueOf ( arg . getValue ( ) ) ) ; break ; default : throw new IllegalArgumentException ( "Unhandled argument " + arg . getKey ( ) ) ; } } builder . withDataModel ( engine ) . build ( ) . generateSourceFiles ( ) ; }
Usage: java HollowAPIGenerator --argName1=argValue1 --argName2==argValue2. See {@link GeneratorArguments} for
available arguments.
@param args the arguments
@throws IOException if a schema could not be read or the data model written
@throws ClassNotFoundException if a class of a data model cannot be loaded
Usage : java HollowAPIGenerator -- argName1 = argValue1 -- argName2 == argValue2 . See {