Class ResourceKeyFactory
- java.lang.Object
-
- io.github.astrapi69.resourcebundle.locale.ResourceKeyFactory
-
public final class ResourceKeyFactory extends java.lang.Object
A factory for creating new resource(properties) key asString
objects.
-
-
Constructor Summary
Constructors Constructor Description ResourceKeyFactory()
-
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.
-
-
-
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.
-
-