站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 2.1.0 API 文档英文版

StaticLabeledEnumResolver (Spring Framework API 2.1) - Spring Framework 2.1.0 API 文档英文版


The Spring Framework

org.springframework.core.enums
Class StaticLabeledEnumResolver

java.lang.Object
  extended by org.springframework.core.enums.AbstractCachingLabeledEnumResolver
      extended by org.springframework.core.enums.StaticLabeledEnumResolver
All Implemented Interfaces:
LabeledEnumResolver

public class StaticLabeledEnumResolver
extends AbstractCachingLabeledEnumResolver

LabeledEnumResolver that resolves statically defined enumerations. Static implies all enum instances were defined within Java code, implementing the type-safe enum pattern.

Since:
1.2.2
Author:
Keith Donald, Juergen Hoeller

Field Summary
 
Fields inherited from class org.springframework.core.enums.AbstractCachingLabeledEnumResolver
logger
 
Constructor Summary
StaticLabeledEnumResolver()
           
 
Method Summary
protected  Set findLabeledEnums(Class type)
          Template method to be implemented by subclasses.
static StaticLabeledEnumResolver instance()
          Return the shared StaticLabeledEnumResolver singleton instance.
 
Methods inherited from class org.springframework.core.enums.AbstractCachingLabeledEnumResolver
getLabeledEnumByCode, getLabeledEnumByLabel, getLabeledEnumMap, getLabeledEnumSet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StaticLabeledEnumResolver

public StaticLabeledEnumResolver()
Method Detail

instance

public static StaticLabeledEnumResolver instance()
Return the shared StaticLabeledEnumResolver singleton instance. Mainly for resolving unique StaticLabeledEnum references on deserialization.

See Also:
StaticLabeledEnum

findLabeledEnums

protected Set findLabeledEnums(Class type)
Description copied from class: AbstractCachingLabeledEnumResolver
Template method to be implemented by subclasses. Supposed to find all LabeledEnum instances for the given type.

Specified by:
findLabeledEnums in class AbstractCachingLabeledEnumResolver
Parameters:
type - the enum type
Returns:
the Set of LabeledEnum instances
See Also:
LabeledEnum

The Spring Framework

Copyright © 2002-2007 The Spring Framework.