MainClassFinder (Grails 6.0.0)

Package: org.grails.io.support

## [Groovy] Class MainClassFinder

- org.grails.io.support.MainClassFinder

-     @groovy.transform.CompileStatic
      class MainClassFinder
      extends java.lang.Object

  Authors:
    Graeme Rocher
  Since:
    3.0

- - ### Nested Class Summary

    Nested classes
    Modifiers | Name | Description
    --- | --- | ---
    `static class` | `MainClassFinder.MainMethodFinder` |

  - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `private static java.lang.String` | `MAIN_METHOD_NAME` |
    `private static groovyjarjarasm.asm.Type` | `MAIN_METHOD_TYPE` |
    `private static groovyjarjarasm.asm.Type` | `STRING_ARRAY_TYPE` |
    `private static java.util.Map<java.lang.String, java.lang.String>` | `mainClasses` |

  - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `static java.util.Map<java.lang.String, java.lang.String>` | `mainClasses`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `MainClassFinder ()`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `static java.lang.String` | `findMainClass(java.io.File rootFolder)`
    `` | `private static java.io.File` | `findRootDirectory(java.io.File file)`
    `` | `protected static boolean` | `isMainClass(groovyjarjarasm.asm.ClassReader classReader)`
    `` | `static java.lang.String` | `searchMainClass(java.net.URI path)` Searches for the main class relative to the give path that is within the project tree

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Field Detail

    - #### private static final java.lang.String MAIN_METHOD_NAME

    - #### private static final groovyjarjarasm.asm.Type MAIN_METHOD_TYPE

    - #### private static final groovyjarjarasm.asm.Type STRING_ARRAY_TYPE

    - #### private static final java.util.Map<java.lang.String, java.lang.String> mainClasses

  - ### Property Detail

    - #### static final java.util.Map<java.lang.String, java.lang.String> mainClasses

  - ### Constructor Detail

    - #### MainClassFinder()

  - ### Method Detail

    - #### static java.lang.String findMainClass(java.io.File rootFolder)

    - #### private static java.io.File findRootDirectory(java.io.File file)

    - #### protected static boolean isMainClass(groovyjarjarasm.asm.ClassReader classReader)

    - #### static java.lang.String searchMainClass(java.net.URI path)

      Searches for the main class relative to the give path that is within the project tree

      Parameters:
        `path` - The path as a URI
      Returns:
        The name of the main class