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

## org.springframework.core.enums
Class AbstractCachingLabeledEnumResolver

    java.lang.Object
      org.springframework.core.enums.AbstractCachingLabeledEnumResolver

All Implemented Interfaces:
  LabeledEnumResolver

Direct Known Subclasses:
  StaticLabeledEnumResolver

Deprecated. as of Spring 3.0, in favor of Java 5 enums.

    @Deprecated
    public abstract class AbstractCachingLabeledEnumResolver

extends java.lang.Object
implements LabeledEnumResolver

Abstract base class for `LabeledEnumResolver` implementations, caching all retrieved `LabeledEnum` instances.

Subclasses need to implement the template method `findLabeledEnums(Class)`.

Since:
  1.2.2
Author:
  Keith Donald, Juergen Hoeller
See Also:
  `findLabeledEnums(Class)`

Field Summary
`protected org.apache.commons.logging.Log` | `logger` Deprecated.

Constructor Summary
`AbstractCachingLabeledEnumResolver()` Deprecated.

Method Summary
`protected abstract java.util.Set<LabeledEnum>` | `findLabeledEnums(java.lang.Class type)` Deprecated. Template method to be implemented by subclasses.
`LabeledEnum` | `getLabeledEnumByCode(java.lang.Class type, java.lang.Comparable code)` Deprecated. Resolve a single `LabeledEnum` by its identifying code.
`LabeledEnum` | `getLabeledEnumByLabel(java.lang.Class type, java.lang.String label)` Deprecated. Resolve a single `LabeledEnum` by its identifying code.
`java.util.Map<java.lang.Comparable,LabeledEnum>` | `getLabeledEnumMap(java.lang.Class type)` Deprecated. Return a map of enumerations of a particular type.
`java.util.Set<LabeledEnum>` | `getLabeledEnumSet(java.lang.Class type)` Deprecated. Return a set of enumerations of a particular type.

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

Field Detail

### logger

    protected final transient org.apache.commons.logging.Log logger

  Deprecated.

Constructor Detail

### AbstractCachingLabeledEnumResolver

    public AbstractCachingLabeledEnumResolver()

  Deprecated.

Method Detail

### getLabeledEnumSet

    public java.util.Set<LabeledEnum> getLabeledEnumSet(java.lang.Class type)
                                                 throws java.lang.IllegalArgumentException

  Deprecated.
  Description copied from interface: `LabeledEnumResolver`
  Return a set of enumerations of a particular type. Each element in the set should be an instance of LabeledEnum.

  Specified by:
    `getLabeledEnumSet` in interface `LabeledEnumResolver`
  Parameters:
    `type` - the enum type
  Returns:
    a set of localized enumeration instances for the provided type
  Throws:
    `java.lang.IllegalArgumentException` - if the type is not supported

### getLabeledEnumMap

    public java.util.Map<java.lang.Comparable,LabeledEnum> getLabeledEnumMap(java.lang.Class type)
                                                                      throws java.lang.IllegalArgumentException

  Deprecated.
  Description copied from interface: `LabeledEnumResolver`
  Return a map of enumerations of a particular type. Each element in the map should be a key/value pair, where the key is the enum code, and the value is the `LabeledEnum` instance.

  Specified by:
    `getLabeledEnumMap` in interface `LabeledEnumResolver`
  Parameters:
    `type` - the enum type
  Returns:
    a Map of localized enumeration instances, with enum code as key and `LabeledEnum` instance as value
  Throws:
    `java.lang.IllegalArgumentException` - if the type is not supported

### getLabeledEnumByCode

    public LabeledEnum getLabeledEnumByCode(java.lang.Class type,
                                            java.lang.Comparable code)
                                     throws java.lang.IllegalArgumentException

  Deprecated.
  Description copied from interface: `LabeledEnumResolver`
  Resolve a single `LabeledEnum` by its identifying code.

  Specified by:
    `getLabeledEnumByCode` in interface `LabeledEnumResolver`
  Parameters:
    `type` - the enum type
    `code` - the enum code
  Returns:
    the enum
  Throws:
    `java.lang.IllegalArgumentException` - if the code did not map to a valid instance

### getLabeledEnumByLabel

    public LabeledEnum getLabeledEnumByLabel(java.lang.Class type,
                                             java.lang.String label)
                                      throws java.lang.IllegalArgumentException

  Deprecated.
  Description copied from interface: `LabeledEnumResolver`
  Resolve a single `LabeledEnum` by its identifying code.

  Specified by:
    `getLabeledEnumByLabel` in interface `LabeledEnumResolver`
  Parameters:
    `type` - the enum type
    `label` - the enum label
  Returns:
    the enum
  Throws:
    `java.lang.IllegalArgumentException` - if the label did not map to a valid instance

### findLabeledEnums

    protected abstract java.util.Set<LabeledEnum> findLabeledEnums(java.lang.Class type)

  Deprecated.
  Template method to be implemented by subclasses. Supposed to find all LabeledEnum instances for the given type.

  Parameters:
    `type` - the enum type
  Returns:
    the Set of LabeledEnum instances
  See Also:
    `LabeledEnum`

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