core/src/main/java/nl/nn/adapterframework/doc/IbisDocExtractor.java
/**
     * Writes the folders object containing all information to a Json.
     */
Writes the folders object containing all information to a Json.
Writes the folders object containing all information to a Json .
public void writeToJsonUrl() {
        JSONArray newFolders = new JSONArray();
        JSONArray newClasses;
        JSONArray newMethods;
        try {
            for (AFolder folder : folders) {
                JSONObject folderObject = new JSONObject();
                folderObject.put("name", folder.getName());
                newClasses = new JSONArray();
                for (AClass aClass : folder.getClasses()) {
                    JSONObject classObject = new JSONObject();
                    classObject.put("name", aClass.getClazz().getSimpleName());
                    classObject.put("packageName", aClass.getClazz().getName());
                    classObject.put("javadocLink", aClass.getJavadocLink());
                    classObject.put("superClasses", aClass.getSuperClasses());
                    newMethods = new JSONArray();
                    for (AMethod method : aClass.getMethods()) {
                        JSONObject methodObject = new JSONObject();
                        methodObject.put("name", method.getName());
                        methodObject.put("originalClassName", method.getOriginalClassName());
                        methodObject.put("description", method.getDescription());
                        methodObject.put("defaultValue", method.getDefaultValue());
                        methodObject.put("order", method.getOrder());
                        methodObject.put("deprecated", method.isDeprecated());
                        newMethods.put(methodObject);
                    }
                    classObject.put("methods", newMethods);
                    newClasses.put(classObject);
                }
                folderObject.put("classes", newClasses);
                newFolders.put(folderObject);
            }
        } catch (JSONException e) {
            e.printStackTrace();
        }
        json = newFolders.toString();
    }
public void writeToJsonUrl ( ) { JSONArray newFolders = new JSONArray ( ) ; JSONArray newClasses ; JSONArray newMethods ; try { for ( AFolder folder : folders ) { JSONObject folderObject = new JSONObject ( ) ; folderObject . put ( "name" , folder . getName ( ) ) ; newClasses = new JSONArray ( ) ; for ( AClass aClass : folder . getClasses ( ) ) { JSONObject classObject = new JSONObject ( ) ; classObject . put ( "name" , aClass . getClazz ( ) . getSimpleName ( ) ) ; classObject . put ( "packageName" , aClass . getClazz ( ) . getName ( ) ) ; classObject . put ( "javadocLink" , aClass . getJavadocLink ( ) ) ; classObject . put ( "superClasses" , aClass . getSuperClasses ( ) ) ; newMethods = new JSONArray ( ) ; for ( AMethod method : aClass . getMethods ( ) ) { JSONObject methodObject = new JSONObject ( ) ; methodObject . put ( "name" , method . getName ( ) ) ; methodObject . put ( "originalClassName" , method . getOriginalClassName ( ) ) ; methodObject . put ( "description" , method . getDescription ( ) ) ; methodObject . put ( "defaultValue" , method . getDefaultValue ( ) ) ; methodObject . put ( "order" , method . getOrder ( ) ) ; methodObject . put ( "deprecated" , method . isDeprecated ( ) ) ; newMethods . put ( methodObject ) ; } classObject . put ( "methods" , newMethods ) ; newClasses . put ( classObject ) ; } folderObject . put ( "classes" , newClasses ) ; newFolders . put ( folderObject ) ; } } catch ( JSONException e ) { e . printStackTrace ( ) ; } json = newFolders . toString ( ) ; }
Writes the folders object containing all information to a Json.
Writes the folders object containing all information to a Json .