Package org.zkoss.xel.util

## Class SimpleMapper

- java.lang.Object
- - org.zkoss.xel.util.TaglibMapper
  - - org.zkoss.xel.util.SimpleMapper

- All Implemented Interfaces:
    `java.io.Serializable`, `java.lang.Cloneable`, `FunctionMapper`, `FunctionMapperExt`

      public class SimpleMapper
      extends TaglibMapper

  A simple function mapper.
  Since:
    3.0.0
  Author:
    tomyeh
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class org.zkoss.xel.util.TaglibMapper

      `_clses, _mtds`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `SimpleMapper()` |
    `SimpleMapper​(FunctionMapper parent)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.util.Collection<java.lang.String>` | `getClassNames()` | Returns a readonly collection of the logic names of the class (never null).
    `FunctionMapper` | `getParent()` | Returns the parent mapper, or null if no parent.
    `java.lang.Class` | `resolveClass​(java.lang.String name)` | Resolves a class with the specified logic name, or null if not found.
    `Function` | `resolveFunction​(java.lang.String prefix, java.lang.String name)` | Resolves a function `Function` with the specified name and prefix.
    `void` | `setParent​(FunctionMapper parent)` | Sets the parent mapper.

    - ### Methods inherited from class org.zkoss.xel.util.TaglibMapper

      `addClass, addFunction, clone, equals, hashCode, load, load, load, load`

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

      `finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SimpleMapper

          public SimpleMapper()

    - #### SimpleMapper

          public SimpleMapper​(FunctionMapper parent)

  - ### Method Detail

    - #### getParent

          public FunctionMapper getParent()

      Returns the parent mapper, or null if no parent.

    - #### setParent

          public void setParent​(FunctionMapper parent)

      Sets the parent mapper.
      Parameters:
        `parent` - the parent mapper, or null if no parent.

    - #### resolveFunction

          public Function resolveFunction​(java.lang.String prefix,
                                          java.lang.String name)

      Description copied from interface: `FunctionMapper`
      Resolves a function `Function` with the specified name and prefix.

      Note: not all EL evaluator support `FunctionMapper.resolveFunction(java.lang.String, java.lang.String)`. Currently only JSP 2.0/2.1 EL-based expression factories support this method. You can check `ExpressionFactory.isSupported(int)` for this support.

      Specified by:
        `resolveFunction` in interface `FunctionMapper`
      Overrides:
        `resolveFunction` in class `TaglibMapper`
      Parameters:
        `prefix` - the prefix of the function, or "" if no prefix
        `name` - the name of the function to resolve

    - #### getClassNames

          public java.util.Collection<java.lang.String> getClassNames()

      Description copied from interface: `FunctionMapperExt`
      Returns a readonly collection of the logic names of the class (never null). Note: it is the name to resolve class, not the real class name. In other words, it is the logical name maintained by this function mapper.
      Specified by:
        `getClassNames` in interface `FunctionMapperExt`
      Overrides:
        `getClassNames` in class `TaglibMapper`

    - #### resolveClass

          public java.lang.Class resolveClass​(java.lang.String name)

      Description copied from interface: `FunctionMapperExt`
      Resolves a class with the specified logic name, or null if not found.

      Note: not all EL evaluator support `FunctionMapperExt.resolveClass(java.lang.String)`. JSP 2.0/2.1 EL-based expression factories don't support this method. You can check `ExpressionFactory.isSupported(int)` for this support.

      Specified by:
        `resolveClass` in interface `FunctionMapperExt`
      Overrides:
        `resolveClass` in class `TaglibMapper`
      Returns:
        the class of the specified logic name.