de.esprit.appsuite.jversion

## Class AbstractJavaVersionScanner<C extends ApplicationContext>

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.appsuite.launch.AbstractApplicationObject<C>
    - - de.esprit.appsuite.jversion.AbstractJavaVersionScanner<C>

- All Implemented Interfaces:
    ApplicationObject<C>, SimpleLogSupport, Dumpable
  Direct Known Subclasses:
    JavaVersionScannerLinux, JavaVersionScannerSolaris, JavaVersionScannerWindows

      public abstract class AbstractJavaVersionScanner<C extends ApplicationContext>
      extends AbstractApplicationObject<C>

  This class scans the file system for java installations. On each one found it runs the according java executable and reads the returned system properties in order to create a list of `JavaVersion` objects.
  Author:
    Rainer Buesch

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractJavaVersionScanner(C ctx, LogChannel logCh, java.util.List<JavaVersion> versionList)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected abstract java.io.File[]` | `getDefaultScanDirectories()`
    `protected abstract java.io.File` | `getJavaHomeDirectory()`
    `void` | `processJavaVersion(java.io.File instDir, java.io.File javaExecutable)`
    `protected abstract void` | `scanInstallationDir(java.io.File instDir)`
    `void` | `scanJavaVersions(java.io.File baseDir)`

    - ### Methods inherited from class de.esprit.appsuite.launch.AbstractApplicationObject

      `getApplicationContext, getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannel`

    - ### Methods inherited from class de.esprit.common.util.DumpableObject

      `configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toDumpString, toString, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### AbstractJavaVersionScanner

          public AbstractJavaVersionScanner(C ctx,
                                    LogChannel logCh,
                                    java.util.List<JavaVersion> versionList)

  - ### Method Detail

    - #### scanInstallationDir

          protected abstract void scanInstallationDir(java.io.File instDir)
                                               throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### getDefaultScanDirectories

          protected abstract java.io.File[] getDefaultScanDirectories()

    - #### getJavaHomeDirectory

          protected abstract java.io.File getJavaHomeDirectory()

    - #### scanJavaVersions

          public void scanJavaVersions(java.io.File baseDir)
                                throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### processJavaVersion

          public void processJavaVersion(java.io.File instDir,
                                java.io.File javaExecutable)
                                  throws java.lang.Exception

      Throws:
        `java.lang.Exception`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.