Package generic.application

# Class GenericApplicationLayout

java.lang.Object
utility.application.ApplicationLayout
generic.application.GenericApplicationLayout

public class GenericApplicationLayout extends ApplicationLayout
A low-level implementation of `ApplicationLayout` that is suitable for basic applications. This class makes use of the `Module` system to find application components at runtime.

- ## Field Summary

  ### Fields inherited from class utility.application.ApplicationLayout

  `applicationInstallationDir, applicationProperties, applicationRootDirs, extensionArchiveDir, extensionInstallationDirs, modules, patchDir, userCacheDir, userSettingsDir, userTempDir`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GenericApplicationLayout(ApplicationProperties applicationProperties)`
  Constructs a new application layout object with the given set of application properties.
  `GenericApplicationLayout(String name, String version)`
  Constructs a new application layout object with the given name and version.
  `GenericApplicationLayout(Collection<ResourceFile> applicationRootDirs, ApplicationProperties applicationProperties)`
  Constructs a new application layout object with the given set of application properties.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected Map<String,GModule>`
  `findModules()`
  `protected Collection<ResourceFile>`
  `getAdditionalApplicationRootDirs(Collection<ResourceFile> roots)`
  `static Collection<ResourceFile>`
  `getDefaultApplicationRootDirs()`
  Get the default list of Application directories.

  ### Methods inherited from class utility.application.ApplicationLayout

  `createUserDirs, getApplicationInstallationDir, getApplicationProperties, getApplicationRootDirs, getExtensionArchiveDir, getExtensionInstallationDirs, getModules, getPatchDir, getUserCacheDir, getUserSettingsDir, getUserTempDir, inSingleJarMode`

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

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

- ## Constructor Details

  - ### GenericApplicationLayout

    public GenericApplicationLayout(String name, String version) throws FileNotFoundException
    Constructs a new application layout object with the given name and version.
    Parameters:
      `name` - The name of the application.
      `version` - The version of the application.
    Throws:
      `FileNotFoundException` - if there was a problem getting a user directory.

  - ### GenericApplicationLayout

    public GenericApplicationLayout(ApplicationProperties applicationProperties) throws FileNotFoundException
    Constructs a new application layout object with the given set of application properties. The default Ghidra application root directory(s) will be used.
    Parameters:
      `applicationProperties` - The properties object that will be read system properties.
    Throws:
      `FileNotFoundException` - if there was a problem getting a user directory.

  - ### GenericApplicationLayout

    public GenericApplicationLayout(Collection<ResourceFile> applicationRootDirs, ApplicationProperties applicationProperties) throws FileNotFoundException
    Constructs a new application layout object with the given set of application properties.
    Parameters:
      `applicationRootDirs` - list of application root directories which should be used to identify modules and resources. The first entry will be treated as the installation root.
      `applicationProperties` - The properties object that will be read system properties.
    Throws:
      `FileNotFoundException` - if there was a problem getting a user directory.

- ## Method Details

  - ### getAdditionalApplicationRootDirs

    protected Collection<ResourceFile> getAdditionalApplicationRootDirs(Collection<ResourceFile> roots)

  - ### findModules

    protected Map<String,GModule> findModules()

  - ### getDefaultApplicationRootDirs

    public static Collection<ResourceFile> getDefaultApplicationRootDirs()
    Get the default list of Application directories. In repo-based development mode this includes the root Ghidra directory within each repo. When not in development mode, the requirement is that the current working directory correspond to the installation root. The first entry will be the primary root in both cases.
    Returns:
      root directories