Package org.zkoss.bind.impl

## Class TemplateResolverImpl

- java.lang.Object
- - org.zkoss.bind.impl.TemplateResolverImpl

- All Implemented Interfaces:
    `java.io.Serializable`, `TemplateResolver`
  Direct Known Subclasses:
    `TemplateResolverImpl`

      public class TemplateResolverImpl
      extends java.lang.Object
      implements TemplateResolver, java.io.Serializable

  The resolver resolves template and handles template changes
  Since:
    6.0.0
  Author:
    dennis
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from interface org.zkoss.bind.sys.TemplateResolver

      `EACH_ATTR, EACH_STATUS_VAR, EACH_VAR, STATUS_ATTR, TEMPLATE_OBJECT`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `TemplateResolverImpl​(Binder binder, Component comp, java.lang.String attr, java.lang.String templateExpr, java.util.Map<java.lang.String,​java.lang.Object> templateArgs)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addTemplateTracking​(Component eachComp, java.lang.Object eachData, int index, int size)` | Add template tracking to component
    `protected java.lang.Object` | `evaluateTemplate​(Component eachComp, java.lang.Object eachData, int index, int size)` |
    `protected java.lang.Object` | `evaluateTemplate​(Component eachComp, java.lang.Object eachData, int index, int size, java.lang.String subType)` |
    `java.lang.String` | `getAttr()` |
    `Binder` | `getBinder()` |
    `Component` | `getComponent()` |
    `java.lang.String` | `getExpression()` |
    `java.util.Map<java.lang.String,​java.lang.Object>` | `getTemplateArgs()` |
    `protected Binding` | `getTemplateBinding​(Component eachComp, java.lang.Object eachData, int index, int size)` |
    `Template` | `resolveTemplate​(Component eachComp, java.lang.Object eachData, int index, int size)` |
    `Template` | `resolveTemplate​(Component eachComp, java.lang.Object eachData, int index, int size, java.lang.String subType)` | Resolve the template for the component
    `java.lang.String` | `toString()` |

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

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

- - ### Constructor Detail

    - #### TemplateResolverImpl

          public TemplateResolverImpl​(Binder binder,
                                      Component comp,
                                      java.lang.String attr,
                                      java.lang.String templateExpr,
                                      java.util.Map<java.lang.String,​java.lang.Object> templateArgs)

  - ### Method Detail

    - #### getBinder

          public Binder getBinder()

    - #### getComponent

          public Component getComponent()

    - #### getExpression

          public java.lang.String getExpression()

    - #### getTemplateArgs

          public java.util.Map<java.lang.String,​java.lang.Object> getTemplateArgs()

    - #### getAttr

          public java.lang.String getAttr()

    - #### evaluateTemplate

          protected java.lang.Object evaluateTemplate​(Component eachComp,
                                                      java.lang.Object eachData,
                                                      int index,
                                                      int size)

    - #### evaluateTemplate

          protected java.lang.Object evaluateTemplate​(Component eachComp,
                                                      java.lang.Object eachData,
                                                      int index,
                                                      int size,
                                                      java.lang.String subType)

    - #### resolveTemplate

          public Template resolveTemplate​(Component eachComp,
                                          java.lang.Object eachData,
                                          int index,
                                          int size)

    - #### resolveTemplate

          public Template resolveTemplate​(Component eachComp,
                                          java.lang.Object eachData,
                                          int index,
                                          int size,
                                          java.lang.String subType)

      Description copied from interface: `TemplateResolver`
      Resolve the template for the component
      Specified by:
        `resolveTemplate` in interface `TemplateResolver`
      Parameters:
        `eachComp` - the template to be resolved of the component
        `eachData` - the data for resolver
        `index` - the index of each
        `size` - the size of data set
        `subType` - the sub-type of template should be resolved
      Returns:
        the template if exist.

    - #### addTemplateTracking

          public void addTemplateTracking​(Component eachComp,
                                          java.lang.Object eachData,
                                          int index,
                                          int size)

      Description copied from interface: `TemplateResolver`
      Add template tracking to component
      Specified by:
        `addTemplateTracking` in interface `TemplateResolver`
      Parameters:
        `eachComp` - the template to be resolved of the component
        `eachData` - the data for resolver
        `index` - the index of each
        `size` - the size of data set

    - #### getTemplateBinding

          protected Binding getTemplateBinding​(Component eachComp,
                                               java.lang.Object eachData,
                                               int index,
                                               int size)

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`