Class NameUtil

java.lang.Object
com.landawn.abacus.util.NameUtil

@Internal public final class NameUtil extends Object
It's tool for the conversion by between the simple name and canonical name.
Since:
0.8
Author:
haiyangl
  • Method Details

    • isCachedName

      public static boolean isCachedName(String str)
      Checks if is cached name.
      Parameters:
      str -
      Returns:
      true, if is cached name
    • getCachedName

      public static String getCachedName(String str)
      Gets the cached name.
      Parameters:
      str -
      Returns:
    • cacheName

      public static String cacheName(String name, boolean force)
      Parameters:
      name -
      force - ignore the request if already cached.
      Returns:
    • isCanonicalName

      public static boolean isCanonicalName(String parentName, String name)
      Checks if is canonical name.
      Parameters:
      parentName -
      name -
      Returns:
      true if the specified name starts with parentName + "."
    • getCanonicalName

      public static String getCanonicalName(String parentName, String name)
      Gets the canonical name.
      Parameters:
      parentName -
      name -
      Returns:
      or the original string if the specified name starts with parentName + ".", otherwise, an empty string "".
    • getSimpleName

      public static String getSimpleName(String name)
      Gets the simple name.
      Parameters:
      name -
      Returns:
    • getParentName

      public static String getParentName(String name)
      Gets the parent name.
      Parameters:
      name -
      Returns:
      an empty String "" if the specified name is not a canonical property name.