|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.tangosol.coherence.rest.DefaultKeyConverter
public class DefaultKeyConverter
Default implementation of KeyConverter
for a given key class.
This KeyConverter
implementation uses the following rules to perform key conversion:
Field Summary | |
---|---|
protected static java.text.DateFormat |
DATE_FORMAT DateFormat instance that will be used to convert Date keys. |
protected java.lang.Class |
m_clzKey Key class. |
protected java.lang.reflect.Constructor |
m_ctorFromString Constructor to use for conversion from string. |
protected java.lang.reflect.Method |
m_methFromString Static method to use for conversion from string. |
protected static java.lang.String[] |
METHODS Method names that should be tried in order when looking for a method that can be used for conversion from string. |
Constructor Summary | |
---|---|
DefaultKeyConverter(java.lang.Class clzKey) Construct a DefaultKeyConverter instance. |
Method Summary | |
---|---|
protected java.lang.reflect.Constructor |
findConstructor() Find a key class constructor that accepts a single String argument. |
protected java.lang.reflect.Method |
findMethod(java.lang.String sMethodName) Find a static method with a specified name that accepts a single String argument. |
java.lang.Object |
fromString(java.lang.String sKey) Convert a string representation of a key into its object form. |
java.lang.String |
toString(java.lang.Object oKey) Convert an object representation of a key into its string form. |
Field Detail |
---|
protected final java.lang.Class m_clzKey
protected final java.lang.reflect.Constructor m_ctorFromString
protected final java.lang.reflect.Method m_methFromString
protected static final java.lang.String[] METHODS
protected static final java.text.DateFormat DATE_FORMAT
Constructor Detail |
---|
public DefaultKeyConverter(java.lang.Class clzKey)
clzKey
- key classMethod Detail |
---|
public java.lang.Object fromString(java.lang.String sKey)
fromString
in interface KeyConverter
sKey
- key as a stringpublic java.lang.String toString(java.lang.Object oKey)
toString
in interface KeyConverter
oKey
- key in its original object formprotected java.lang.reflect.Constructor findConstructor()
protected java.lang.reflect.Method findMethod(java.lang.String sMethodName)
sMethodName
- the name of the method
|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |