Class ImportContextImpl

    • Constructor Summary

      Constructor Description
      ImportContextImpl​(java.lang.String basePackage)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String generateImports()  
      java.lang.String importType​(java.lang.String fqcn)
      Add fqcn to the import list.
      static java.lang.String qualifier​(java.lang.String qualifiedName)  
      java.lang.String staticImport​(java.lang.String fqcn, java.lang.String member)  
      static java.lang.String unqualify​(java.lang.String qualifiedName)  
      • Methods inherited from class java.lang.Object

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

      • ImportContextImpl

        public ImportContextImpl​(java.lang.String basePackage)
    • Method Detail

      • importType

        public java.lang.String importType​(java.lang.String fqcn)
        Add fqcn to the import list. Returns fqcn as needed in source code. Attempts to handle fqcn with array and generics references.

        e.g. java.util.Collection<org.marvel.Hulk> imports java.util.Collection and returns Collection org.marvel.Hulk[] imports org.marvel.Hulk and returns Hulk

        Specified by:
        importType in interface ImportContext
        fqcn - Fully qualified class name
        import string
      • staticImport

        public java.lang.String staticImport​(java.lang.String fqcn,
                                             java.lang.String member)
        Specified by:
        staticImport in interface ImportContext
      • unqualify

        public static java.lang.String unqualify​(java.lang.String qualifiedName)
      • qualifier

        public static java.lang.String qualifier​(java.lang.String qualifiedName)