|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.core.enums.AbstractCachingLabeledEnumResolver
@Deprecated public abstract class AbstractCachingLabeledEnumResolver
Abstract base class for LabeledEnumResolver
implementations,
caching all retrieved LabeledEnum
instances.
Subclasses need to implement the template method
findLabeledEnums(Class)
.
findLabeledEnums(Class)
Nested Class Summary | |
---|---|
private class |
AbstractCachingLabeledEnumResolver.LabeledEnumCache
Deprecated. Inner cache class that implements lazy building of LabeledEnum Maps. |
Field Summary | |
---|---|
private AbstractCachingLabeledEnumResolver.LabeledEnumCache |
labeledEnumCache
Deprecated. |
protected 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 |
---|
protected final transient Log logger
private final AbstractCachingLabeledEnumResolver.LabeledEnumCache labeledEnumCache
Constructor Detail |
---|
public AbstractCachingLabeledEnumResolver()
Method Detail |
---|
public java.util.Set<LabeledEnum> getLabeledEnumSet(java.lang.Class type) throws java.lang.IllegalArgumentException
LabeledEnumResolver
getLabeledEnumSet
in interface LabeledEnumResolver
type
- the enum type
java.lang.IllegalArgumentException
- if the type is not supportedpublic java.util.Map<java.lang.Comparable,LabeledEnum> getLabeledEnumMap(java.lang.Class type) throws java.lang.IllegalArgumentException
LabeledEnumResolver
LabeledEnum
instance.
getLabeledEnumMap
in interface LabeledEnumResolver
type
- the enum type
LabeledEnum
instance as value
java.lang.IllegalArgumentException
- if the type is not supportedpublic LabeledEnum getLabeledEnumByCode(java.lang.Class type, java.lang.Comparable code) throws java.lang.IllegalArgumentException
LabeledEnumResolver
LabeledEnum
by its identifying code.
getLabeledEnumByCode
in interface LabeledEnumResolver
type
- the enum typecode
- the enum code
java.lang.IllegalArgumentException
- if the code did not map to a valid instancepublic LabeledEnum getLabeledEnumByLabel(java.lang.Class type, java.lang.String label) throws java.lang.IllegalArgumentException
LabeledEnumResolver
LabeledEnum
by its identifying code.
getLabeledEnumByLabel
in interface LabeledEnumResolver
type
- the enum typelabel
- the enum label
java.lang.IllegalArgumentException
- if the label did not map to a valid instanceprotected abstract java.util.Set<LabeledEnum> findLabeledEnums(java.lang.Class type)
type
- the enum type
LabeledEnum
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |