Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tiles.evaluator
Class BasicAttributeEvaluatorFactory

    java.lang.Object
      org.apache.tiles.evaluator.BasicAttributeEvaluatorFactory

All Implemented Interfaces:
  AttributeEvaluatorFactory

    public class BasicAttributeEvaluatorFactory

extends java.lang.Object
implements AttributeEvaluatorFactory

Basic implementation of `AttributeEvaluatorFactory`. It supports a default attribute evaluator, in case the language is not recognized.

Since:
  2.2.0
Version:
  $Rev: 788032 $ $Date: 2009-06-24 16:08:32 +0200 (mer, 24 giu 2009) $

Constructor Summary
`BasicAttributeEvaluatorFactory(AttributeEvaluator defaultEvaluator)` Constructor.

Method Summary
`AttributeEvaluator` | `getAttributeEvaluator(Attribute attribute)` Creates and attribute evaluator using an attribute.
`AttributeEvaluator` | `getAttributeEvaluator(java.lang.String language)` Creates and attribute evaluator for the given expression language.
`void` | `registerAttributeEvaluator(java.lang.String language, AttributeEvaluator evaluator)` Registers a known expression language with its attribute evaluator.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### BasicAttributeEvaluatorFactory

    public BasicAttributeEvaluatorFactory(AttributeEvaluator defaultEvaluator)

  Constructor.

  Parameters:
    `defaultEvaluator` - The default evaluator to return if it is not found in the map of known languages.
  Since:
    2.2.0

Method Detail

### registerAttributeEvaluator

    public void registerAttributeEvaluator(java.lang.String language,
                                           AttributeEvaluator evaluator)

  Registers a known expression language with its attribute evaluator.

  Parameters:
    `language` - The name of the expression language.
    `evaluator` - The associated attribute evaluator.
  Since:
    2.2.0

### getAttributeEvaluator

    public AttributeEvaluator getAttributeEvaluator(java.lang.String language)

  Creates and attribute evaluator for the given expression language.

  Specified by:
    `getAttributeEvaluator` in interface `AttributeEvaluatorFactory`
  Parameters:
    `language` - The name of the expression language.
  Returns:
    The attribute evaluator. It must not be `null`.

### getAttributeEvaluator

    public AttributeEvaluator getAttributeEvaluator(Attribute attribute)

  Creates and attribute evaluator using an attribute.

  Specified by:
    `getAttributeEvaluator` in interface `AttributeEvaluatorFactory`
  Parameters:
    `attribute` - The attribute used to obtain the evaluator.
  Returns:
    The attribute evaluator. It must not be `null`.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2010 Apache Software Foundation. All Rights Reserved.