Class AbstractSpringJSONDocScanner

java.lang.Object
org.jsondoc.core.scanner.AbstractJSONDocScanner
org.jsondoc.springmvc.scanner.AbstractSpringJSONDocScanner
All Implemented Interfaces:
org.jsondoc.core.scanner.JSONDocScanner
Direct Known Subclasses:
Spring3JSONDocScanner, Spring4JSONDocScanner

public abstract class AbstractSpringJSONDocScanner
extends org.jsondoc.core.scanner.AbstractJSONDocScanner
  • Field Summary

    Fields inherited from class org.jsondoc.core.scanner.AbstractJSONDocScanner

    allApiMethodDocs, jsondocChangelogs, jsondocControllers, jsondocFlows, jsondocGlobal, jsondocMethods, jsondocMigrations, jsondocObjects, jsondocTemplates, log, reflections
  • Constructor Summary

    Constructors
    Constructor Description
    AbstractSpringJSONDocScanner()  
  • Method Summary

    Modifier and Type Method Description
    static Set<Class<?>> buildJSONDocObjectsCandidates​(Set<Class<?>> candidates, Class<?> clazz, Type type, org.reflections.Reflections reflections)
    Returns a set of classes that are either return types or body objects
    org.jsondoc.core.pojo.ApiDoc initApiDoc​(Class<?> controller)
    ApiDoc is initialized with the Controller's simple class name.
    org.jsondoc.core.pojo.ApiMethodDoc initApiMethodDoc​(Method method, Map<Class<?>,​org.jsondoc.core.pojo.JSONDocTemplate> jsondocTemplates)  
    org.jsondoc.core.pojo.ApiObjectDoc initApiObjectDoc​(Class<?> clazz)  
    Set<Class<?>> jsondocChangelogs()  
    Set<Class<?>> jsondocFlows()  
    Set<Class<?>> jsondocGlobal()  
    Set<Method> jsondocMethods​(Class<?> controller)  
    Set<Class<?>> jsondocMigrations()  
    Set<Class<?>> jsondocObjects​(List<String> packages)  
    org.jsondoc.core.pojo.ApiDoc mergeApiDoc​(Class<?> controller, org.jsondoc.core.pojo.ApiDoc apiDoc)
    Once the ApiDoc has been initialized and filled with other data (version, auth, etc) it's time to merge the documentation with JSONDoc annotation, if existing.
    org.jsondoc.core.pojo.ApiMethodDoc mergeApiMethodDoc​(Method method, org.jsondoc.core.pojo.ApiMethodDoc apiMethodDoc)  
    org.jsondoc.core.pojo.ApiObjectDoc mergeApiObjectDoc​(Class<?> clazz, org.jsondoc.core.pojo.ApiObjectDoc apiObjectDoc)  

    Methods inherited from class org.jsondoc.core.scanner.AbstractJSONDocScanner

    enumConstantsToStringArray, getApiDocs, getApiDocsMap, getApiFlowDocs, getApiFlowDocsMap, getApiGlobalDoc, getApiObjectDocs, getApiObjectsMap, getJSONDoc, jsondocControllers

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AbstractSpringJSONDocScanner

      public AbstractSpringJSONDocScanner()
  • Method Details

    • jsondocMethods

      public Set<Method> jsondocMethods​(Class<?> controller)
      Specified by:
      jsondocMethods in class org.jsondoc.core.scanner.AbstractJSONDocScanner
    • buildJSONDocObjectsCandidates

      public static Set<Class<?>> buildJSONDocObjectsCandidates​(Set<Class<?>> candidates, Class<?> clazz, Type type, org.reflections.Reflections reflections)
      Returns a set of classes that are either return types or body objects
      Parameters:
      candidates -
      clazz -
      type -
      reflections -
      Returns:
    • jsondocObjects

      public Set<Class<?>> jsondocObjects​(List<String> packages)
      Specified by:
      jsondocObjects in class org.jsondoc.core.scanner.AbstractJSONDocScanner
    • jsondocFlows

      public Set<Class<?>> jsondocFlows()
      Specified by:
      jsondocFlows in class org.jsondoc.core.scanner.AbstractJSONDocScanner
    • initApiDoc

      public org.jsondoc.core.pojo.ApiDoc initApiDoc​(Class<?> controller)
      ApiDoc is initialized with the Controller's simple class name.
      Specified by:
      initApiDoc in class org.jsondoc.core.scanner.AbstractJSONDocScanner
    • mergeApiDoc

      public org.jsondoc.core.pojo.ApiDoc mergeApiDoc​(Class<?> controller, org.jsondoc.core.pojo.ApiDoc apiDoc)
      Once the ApiDoc has been initialized and filled with other data (version, auth, etc) it's time to merge the documentation with JSONDoc annotation, if existing.
      Specified by:
      mergeApiDoc in class org.jsondoc.core.scanner.AbstractJSONDocScanner
    • initApiMethodDoc

      public org.jsondoc.core.pojo.ApiMethodDoc initApiMethodDoc​(Method method, Map<Class<?>,​org.jsondoc.core.pojo.JSONDocTemplate> jsondocTemplates)
      Specified by:
      initApiMethodDoc in class org.jsondoc.core.scanner.AbstractJSONDocScanner
    • mergeApiMethodDoc

      public org.jsondoc.core.pojo.ApiMethodDoc mergeApiMethodDoc​(Method method, org.jsondoc.core.pojo.ApiMethodDoc apiMethodDoc)
      Specified by:
      mergeApiMethodDoc in class org.jsondoc.core.scanner.AbstractJSONDocScanner
    • initApiObjectDoc

      public org.jsondoc.core.pojo.ApiObjectDoc initApiObjectDoc​(Class<?> clazz)
      Specified by:
      initApiObjectDoc in class org.jsondoc.core.scanner.AbstractJSONDocScanner
    • mergeApiObjectDoc

      public org.jsondoc.core.pojo.ApiObjectDoc mergeApiObjectDoc​(Class<?> clazz, org.jsondoc.core.pojo.ApiObjectDoc apiObjectDoc)
      Specified by:
      mergeApiObjectDoc in class org.jsondoc.core.scanner.AbstractJSONDocScanner
    • jsondocGlobal

      public Set<Class<?>> jsondocGlobal()
      Specified by:
      jsondocGlobal in class org.jsondoc.core.scanner.AbstractJSONDocScanner
    • jsondocChangelogs

      public Set<Class<?>> jsondocChangelogs()
      Specified by:
      jsondocChangelogs in class org.jsondoc.core.scanner.AbstractJSONDocScanner
    • jsondocMigrations

      public Set<Class<?>> jsondocMigrations()
      Specified by:
      jsondocMigrations in class org.jsondoc.core.scanner.AbstractJSONDocScanner