DefaultGrailsControllerClass (Grails 6.0.0)

Package: org.grails.core

## [Java] Class DefaultGrailsControllerClass

- org.grails.core.DefaultGrailsControllerClass

- All Implemented Interfaces and Traits:
    GrailsControllerClass

      @java.lang.SuppressWarnings("rawtypes")
      public class DefaultGrailsControllerClass
      extends AbstractInjectableGrailsClass
      implements GrailsControllerClass

  Evaluates the conventions contained within controllers to perform auto-configuration.

  Authors:
    Graeme Rocher
    Steven Devijver
  Since:
    0.1

- - ### Nested Class Summary

    Nested classes
    Modifiers | Name | Description
    --- | --- | ---
    `private interface` | `DefaultGrailsControllerClass.ActionInvoker` |
    `private class` | `DefaultGrailsControllerClass.MethodHandleInvoker` |
    `private class` | `DefaultGrailsControllerClass.ReflectionInvoker` |

  - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static java.lang.String` | `ALLOWED_HTTP_METHODS_PROPERTY` |
    `static java.lang.String` | `CONTROLLER` |
    `private static java.lang.String` | `DEFAULT_CLOSURE_PROPERTY` |
    `static java.lang.Object[]` | `EMPTY_ARGS` |
    `static java.lang.String` | `SCOPE` |
    `static java.lang.String` | `SCOPE_SINGLETON` |
    `protected java.util.Map<java.lang.String, java.lang.String>` | `actionUriToViewName` |
    `private java.util.Map<java.lang.String, ActionInvoker>` | `actions` |
    `private java.lang.String` | `defaultActionName` |
    `private java.lang.String` | `namespace` |
    `private java.lang.String` | `scope` |

  - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class AbstractGrailsClass` | `classPropertyFetcher, clazz, fullName, grailsApplication, isAbstract, logicalPropertyName, name, naturalName, packageName, propertyName, shortName`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `DefaultGrailsControllerClass (java.lang.Class<?> clazz)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public java.lang.String` | `actionUriToViewName(java.lang.String actionUri)`
    `` | `public java.util.Set<java.lang.String>` | `getActions()`
    `` | `public java.lang.String` | `getDefaultAction()`
    `` | `public java.lang.String` | `getNamespace()`
    `` | `public java.lang.String` | `getScope()`
    `` | `public void` | `initialize()`
    `` | `public java.lang.Object` | `invoke(java.lang.Object controller, java.lang.String action)` Invokes the controller action for the given name on the given controller instance
    `` | `public boolean` | `isSingleton()`
    `` | `public boolean` | `mapsToURI(java.lang.String uri)`
    `` | `private void` | `methodStrategy(java.util.Map<java.lang.String, ActionInvoker> methodNames)`
    `` | `public void` | `registerUrlConverter(UrlConverter urlConverter)` Register a new UrlConverter with the controller
    `` | `public void` | `setGrailsApplication(GrailsApplication grailsApplication)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class AbstractInjectableGrailsClass` | `byName, byType, getAvailable`
    `class AbstractGrailsClass` | `getApplication, getClazz, getFullName, getLogicalPropertyName, getMetaClass, getMetaProperties, getName, getNaturalName, getPackageName, getPluginName, getPropertyDescriptors, getPropertyName, getPropertyOrStaticPropertyOrFieldValue, getPropertyType, getPropertyValue, getPropertyValue, getPropertyValueObject, getReferenceInstance, getShortName, getStaticPropertyValue, hasMetaMethod, hasMetaMethod, hasMetaProperty, hasProperty, isAbstract, isActionMethod, isReadableProperty, newInstance, resolvePropertyFetcher, setGrailsApplication, toString`

- - ### Field Detail

    - #### public static final java.lang.String ALLOWED_HTTP_METHODS_PROPERTY

    - #### public static final java.lang.String CONTROLLER

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

    - #### public static final java.lang.Object[] EMPTY_ARGS

    - #### public static final java.lang.String SCOPE

    - #### public static final java.lang.String SCOPE_SINGLETON

    - #### protected java.util.Map<java.lang.String, java.lang.String> actionUriToViewName

    - #### private java.util.Map<java.lang.String, ActionInvoker> actions

    - #### private java.lang.String defaultActionName

    - #### private java.lang.String namespace

    - #### private java.lang.String scope

  - ### Constructor Detail

    - #### public DefaultGrailsControllerClass(java.lang.Class<?> clazz)

  - ### Method Detail

    - #### public java.lang.String actionUriToViewName(java.lang.String actionUri)

    - #### @java.lang.Override public java.util.Set<java.lang.String> getActions()

    - #### @java.lang.Override public java.lang.String getDefaultAction()

    - #### public java.lang.String getNamespace()

    - #### @java.lang.Override public java.lang.String getScope()

    - #### public void initialize()

    - #### @java.lang.Override public java.lang.Object invoke(java.lang.Object controller, java.lang.String action)

      Invokes the controller action for the given name on the given controller instance

      throws:
        Throwable
      Parameters:
        `controller` - The controller instance
        `action` - The action name
      Returns:
        The result of the action

    - #### @java.lang.Override public boolean isSingleton()

    - #### @java.lang.Override public boolean mapsToURI(java.lang.String uri)

    - #### private void methodStrategy(java.util.Map<java.lang.String, ActionInvoker> methodNames)

    - #### @java.lang.Override public void registerUrlConverter(UrlConverter urlConverter)

      Register a new UrlConverter with the controller

      Parameters:
        `urlConverter` - The UrlConverter to register

    - #### @java.lang.Override public void setGrailsApplication(GrailsApplication grailsApplication)