Class ResourceKeyFactory


  • public final class ResourceKeyFactory
    extends java.lang.Object
    A factory for creating new resource(properties) key as String objects.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> java.lang.String newResourceKey​(T object, boolean simpleName, java.lang.String keySuffix)
      Creates a new resource key from the given object and the given key.
      static <T> java.lang.String newResourceKey​(T object, java.lang.String keySuffix)
      Creates a new resource key from the given object and the given key.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ResourceKeyFactory

        public ResourceKeyFactory()
    • Method Detail

      • newResourceKey

        public static <T> java.lang.String newResourceKey​(T object,
                                                          java.lang.String keySuffix)
        Creates a new resource key from the given object and the given key. The simple name of the given object will be taken as the prefix and the given keySuffix will be taken as suffix for the generated resource key.
        Type Parameters:
        T - The generic type of the given object.
        Parameters:
        object - The object that will be used to generate the resource key.
        keySuffix - The suffix that will be used to generate the resource key.
        Returns:
        The generated resource key.
      • newResourceKey

        public static <T> java.lang.String newResourceKey​(T object,
                                                          boolean simpleName,
                                                          java.lang.String keySuffix)
        Creates a new resource key from the given object and the given key. The name of the given object will be taken as the prefix and the given keySuffix will be taken as suffix for the generated resource key.
        Type Parameters:
        T - The generic type of the given object.
        Parameters:
        object - The object that will be used to generate the resource key.
        keySuffix - The suffix that will be used to generate the resource key.
        simpleName - The flag if the simple name will be used as prefix.
        Returns:
        The generated resource key.