public final class My
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected static Gson |
gson |
static java.lang.String |
MYHS_SALT |
| Constructor and Description |
|---|
My() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
bin2HexStr(byte[] bin)
Converts the given bytes to hex string form.
|
static java.lang.String |
camelize(java.lang.String word)
The camelize method.
|
static java.lang.String |
constantize(java.lang.String word)
The constantize method.
|
static <T> T |
deminion(java.lang.String str,
java.lang.reflect.Type type)
Deserializes the given JSON string to the object.
|
static java.lang.String |
hs(java.lang.String str)
Obtains the hash in hex string form.
|
static java.lang.String |
hs(java.lang.String str,
java.lang.String charsetName)
Obtains the hash in hex string form.
|
static java.lang.String |
magicalize(java.lang.String word)
The magicalize method.
|
static java.lang.String |
minion(java.lang.Object var)
Serializes the given object to JSON.
|
static java.lang.String |
pascalize(java.lang.String word)
The pascalize method.
|
static java.lang.String |
tableize(java.lang.String word)
The tableize method.
|
public static java.lang.String MYHS_SALT
protected static Gson gson
public static java.lang.String hs(java.lang.String str)
str - a string (converted to bytes) to obtain its hashpublic static java.lang.String hs(java.lang.String str,
java.lang.String charsetName)
str - a string (converted to bytes) to obtain its hashcharsetName - The name of a supported charsetpublic static java.lang.String bin2HexStr(byte[] bin)
bin - bytes to convertpublic static java.lang.String minion(java.lang.Object var)
GSON#toJSON.
But it added the feature own keys sorted in ascii order.var - object to serializepublic static <T> T deminion(java.lang.String str,
java.lang.reflect.Type type)
GSON#fromJSON.
The deserializer classes defined in org/kyojo/minion/My.properties are registered automatically.str - JSON stringtype - the object typepublic static java.lang.String tableize(java.lang.String word)
creativeWork.author → creative_work__authorword - A word to convertpublic static java.lang.String pascalize(java.lang.String word)
creative_work__author → CreativeWork.Authorword - A word to convertpublic static java.lang.String camelize(java.lang.String word)
creative_work__author → creativeWork.authorword - A word to convertpublic static java.lang.String constantize(java.lang.String word)
creativeWork.author → CREATIVE_WORK__AUTHORword - A word to convertpublic static java.lang.String magicalize(java.lang.String word)
creativeWork.author → __CREATIVE_WORK__AUTHOR__word - A word to convert