/**
 * Copyright © 2010-2014 Nokia
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.jsonschema2pojo.example;

import java.io.File;
import java.io.IOException;
import java.net.URL;

import org.jsonschema2pojo.SchemaMapper;
import com.sun.codemodel.JCodeModel;

public class Example {

    public static void main(String[] args) throws IOException {
        
        // BEGIN EXAMPLE
        
        JCodeModel codeModel = new JCodeModel();
        
        URL source = new URL("file:///path/to/my/schema.json");
        
        new SchemaMapper().generate(codeModel, "ClassName", "com.example", source);
        
        codeModel.build(new File("output"));
        
        // END EXAMPLE

    }
    
}

@@ -732,21 +732,295 @@
 ojo.
-SchemaMapper;
+DefaultGenerationConfig;%0Aimport org.jsonschema2pojo.GenerationConfig;%0Aimport org.jsonschema2pojo.Jackson2Annotator;%0Aimport org.jsonschema2pojo.SchemaGenerator;%0Aimport org.jsonschema2pojo.SchemaMapper;%0Aimport org.jsonschema2pojo.SchemaStore;%0Aimport org.jsonschema2pojo.rules.RuleFactory;%0A
 %0Aimp
@@ -1142,25 +1142,17 @@
 ption %7B%0A
-        
 %0A
+
         
@@ -1168,25 +1168,17 @@
 EXAMPLE%0A
-        
 %0A
+
         
@@ -1218,25 +1218,17 @@
 odel();%0A
-        
 %0A
+
         
@@ -1283,24 +1283,25 @@
 json%22);%0A
+%0A
         
 %0A       
@@ -1296,35 +1296,389 @@
     
-%0A        new SchemaMapper()
+GenerationConfig config = new DefaultGenerationConfig() %7B%0A            @Override%0A            public boolean isGenerateBuilders() %7B // set config option by overriding method%0A                return true;%0A            %7D%0A        %7D;%0A%0A        SchemaMapper mapper = new SchemaMapper(new RuleFactory(config, new Jackson2Annotator(), new SchemaStore()), new SchemaGenerator());%0A        mapper
 .gen
@@ -1731,24 +1731,16 @@
 ource);%0A
-        
 %0A       
@@ -1781,17 +1781,9 @@
 ));%0A
-        
 %0A
+
     
@@ -1808,15 +1808,11 @@
 %0A%0A    %7D%0A
-    
 %0A%7D%0A

Update Example to use generation config