Package: org.grails.taglib

## [Java] Class TagLibraryLookup

- org.grails.taglib.TagLibraryLookup

- All Implemented Interfaces and Traits:
    org.springframework.context.ApplicationContextAware, GrailsApplicationAware, org.springframework.beans.factory.InitializingBean

      public class TagLibraryLookup
      extends java.lang.Object

  Looks up tag library instances.

  Authors:
    Graeme Rocher
  Since:
    1.1

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `protected org.springframework.context.ApplicationContext` | `applicationContext` |
    `protected java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.Object>>>` | `encodeAsForTagNamespaces` |
    `protected GrailsApplication` | `grailsApplication` |
    `protected java.util.Map<java.lang.String, NamespacedTagDispatcher>` | `namespaceDispatchers` |
    `protected java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.Object>>` | `tagNamespaces` |
    `protected java.util.Map<java.lang.String, java.util.Set<java.lang.String>>` | `tagsThatReturnObjectForNamespace` |

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `void` | `afterPropertiesSet()`
    `` | `boolean` | `doesTagReturnObject(java.lang.String namespace, java.lang.String tagName)`
    `` | `java.util.Set<java.lang.String>` | `getAvailableNamespaces()` @return The namespaces available
    `` | `java.util.Set<java.lang.String>` | `getAvailableTags(java.lang.String namespace)`
    `` | `java.util.Map<java.lang.String, java.lang.Object>` | `getEncodeAsForTag(java.lang.String namespace, java.lang.String tagName)`
    `` | `boolean` | `hasNamespace(java.lang.String namespace)` Returns whether the given namespace is in use
    `` | `NamespacedTagDispatcher` | `lookupNamespaceDispatcher(java.lang.String namespace)` Looks up a namespace dispatcher for the given namespace
    `` | `groovy.lang.GroovyObject` | `lookupTagLibrary(java.lang.String namespace, java.lang.String tagName)` Looks up a tag library for the given namespace and tag name.
    `` | `protected void` | `putTagLib(java.util.Map<java.lang.String, java.lang.Object> tags, java.lang.String name, GrailsTagLibClass taglib)`
    `` | `protected void` | `registerNamespaceDispatcher(java.lang.String namespace)`
    `` | `void` | `registerTagLib(GrailsTagLibClass taglib)` Registers a tag library for lookup.
    `` | `protected void` | `registerTagLibraries()`
    `` | `protected void` | `registerTemplateNamespace()`
    `` | `void` | `setApplicationContext(org.springframework.context.ApplicationContext applicationContext)`
    `` | `void` | `setGrailsApplication(GrailsApplication grailsApplication)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long, int), java.lang.Object#wait(long), 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

    - #### protected org.springframework.context.ApplicationContext applicationContext

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

    - #### protected GrailsApplication grailsApplication

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

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

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

  - ### Method Detail

    - #### public void afterPropertiesSet()

    - #### public boolean doesTagReturnObject(java.lang.String namespace, java.lang.String tagName)

    - #### public java.util.Set<java.lang.String> getAvailableNamespaces()

      Returns:
        The namespaces available

    - #### public java.util.Set<java.lang.String> getAvailableTags(java.lang.String namespace)

    - #### public java.util.Map<java.lang.String, java.lang.Object> getEncodeAsForTag(java.lang.String namespace, java.lang.String tagName)

    - #### public boolean hasNamespace(java.lang.String namespace)

      Returns whether the given namespace is in use

      Parameters:
        `namespace` - The namespace
      Returns:
        true if it is in use

    - #### public NamespacedTagDispatcher lookupNamespaceDispatcher(java.lang.String namespace)

      Looks up a namespace dispatcher for the given namespace

      Parameters:
        `namespace` - The namespace
      Returns:
        The NamespacedTagDispatcher

    - #### public groovy.lang.GroovyObject lookupTagLibrary(java.lang.String namespace, java.lang.String tagName)

      Looks up a tag library for the given namespace and tag name.

      Parameters:
        `namespace` - The tag library namespace
        `tagName` - The tag name
      Returns:
        The tag library or null if it wasn't found

    - #### protected void putTagLib(java.util.Map<java.lang.String, java.lang.Object> tags, java.lang.String name, GrailsTagLibClass taglib)

    - #### protected void registerNamespaceDispatcher(java.lang.String namespace)

    - #### public void registerTagLib(GrailsTagLibClass taglib)

      Registers a tag library for lookup. Each of the tags in the library is mapped by namespace:name to the taglib bean. If the taglib has already been registered, this method will override the existing information and update the tags to use the new version.

      Parameters:
        `taglib` - The taglib descriptor class.

    - #### protected void registerTagLibraries()

    - #### protected void registerTemplateNamespace()

    - #### public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)

    - #### public void setGrailsApplication(GrailsApplication grailsApplication)