Class ModuleScanner<T>

    • Field Detail

      • archiveFile

        protected File archiveFile
      • classParser

        protected org.glassfish.hk2.classmodel.reflect.Parser classParser
      • deplLogger

        public static final Logger deplLogger
    • Constructor Detail

      • ModuleScanner

        public ModuleScanner()
    • Method Detail

      • completeProcess

        protected void completeProcess​(T bundleDescr,
                                       ReadableArchive archive)
                                throws IOException
        Performs all additional work after the "process" method has finished.

        This is a separate method from "process" so that the app client scanner can invoke it from its overriding process method. All post-processing logic needs to be collected in this one place.

        Parameters:
        bundleDescr -
        archive -
        Throws:
        IOException
      • calculateResults

        protected void calculateResults​(T bundleDesc)
      • addScanClassName

        protected void addScanClassName​(String className)
        This add extra className to be scanned.
        Parameters:
        className -
      • addScanJar

        protected void addScanJar​(File jarFile)
                           throws IOException
        This add all classes in given jarFile to be scanned.
        Parameters:
        jarFile -
        Throws:
        IOException
      • addScanURI

        protected void addScanURI​(URI jarURI)
                           throws IOException
        This add all classes in given jarFile to be scanned.
        Parameters:
        jarURI -
        Throws:
        IOException
      • addScanDirectory

        protected void addScanDirectory​(File directory)
                                 throws IOException
        This will include all class in directory to be scanned.
        Parameters:
        directory -
        Throws:
        IOException
      • getClassLoader

        public ClassLoader getClassLoader()
        Description copied from interface: Scanner
        Returns a ClassLoader capable of loading classes from the underlying medium
        Specified by:
        getClassLoader in interface Scanner<T>
        Returns:
        a class loader capable of loading the classes
      • getElements

        public Set<Class> getElements()
        Description copied from interface: Scanner
        Return a complete set of classes available from this location.
        Specified by:
        getElements in interface Scanner<T>
        Returns:
        the complete set of classes
      • getElements

        public Set<Class> getElements​(Set<String> classNames)
        Description copied from interface: Scanner
        Return a class instance available from this location from class name.
        Specified by:
        getElements in interface Scanner<T>
        Parameters:
        classNames - the list of class name
        Returns:
        the set of classes for given names
      • addLibraryJars

        protected void addLibraryJars​(T bundleDesc,
                                      ReadableArchive moduleArchive)
        Parameters:
        bundleDesc -
        moduleArchive -
      • getTypes

        public org.glassfish.hk2.classmodel.reflect.Types getTypes()
        Description copied from interface: Scanner
        Return the types information for this module
        Specified by:
        getTypes in interface Scanner<T>
        Overrides:
        getTypes in class JavaEEScanner
        Returns:
        types the archive resulting types
      • setParser

        protected void setParser​(org.glassfish.hk2.classmodel.reflect.Parser parser)