Package com.landawn.abacus.util
Class NameUtil
java.lang.Object
com.landawn.abacus.util.NameUtil
It's tool for the conversion by between the simple name and canonical name.
- Since:
- 0.8
- Author:
- haiyangl
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
static String
getCachedName
(String str) Gets the cached name.static String
getParentName
(String name) Gets the parent name.static String
getSimpleName
(String name) Gets the simple name.static boolean
isCachedName
(String str) Checks if is cached name.static boolean
isCanonicalName
(String parentName, String name) Checks if is canonical name.
-
Method Details
-
isCachedName
Checks if is cached name.- Parameters:
str
-- Returns:
- true, if is cached name
-
getCachedName
Gets the cached name.- Parameters:
str
-- Returns:
-
cacheName
- Parameters:
name
-force
- ignore the request if already cached.- Returns:
-
isCanonicalName
Checks if is canonical name.- Parameters:
parentName
-name
-- Returns:
- true if the specified name starts with parentName + "."
-
getSimpleName
Gets the simple name.- Parameters:
name
-- Returns:
-
getParentName
Gets the parent name.- Parameters:
name
-- Returns:
- an empty String "" if the specified
name
is not a canonical property name.
-