Package org.jboss.logging
Class Messages
- java.lang.Object
-
- org.jboss.logging.Messages
-
public final class Messages extends java.lang.ObjectA factory class to produce message bundle implementations.
-
-
Constructor Summary
Constructors Modifier Constructor Description privateMessages()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description private static <T> TdoGetBundle(java.lang.invoke.MethodHandles.Lookup lookup, java.lang.Class<T> type, java.util.Locale locale)static <T> TgetBundle(java.lang.Class<T> type)Deprecated, for removal: This API element is subject to removal in a future version.UsegetBundle(Lookup,Class)instead to avoid errors in modular environments.static <T> TgetBundle(java.lang.Class<T> type, java.util.Locale locale)Deprecated, for removal: This API element is subject to removal in a future version.UsegetBundle(Lookup,Class,Locale)instead to avoid errors in modular environments.static <T> TgetBundle(java.lang.invoke.MethodHandles.Lookup lookup, java.lang.Class<T> type)Get a message bundle of the given type.static <T> TgetBundle(java.lang.invoke.MethodHandles.Lookup lookup, java.lang.Class<T> type, java.util.Locale locale)Get a message bundle of the given type.private static java.lang.Stringjoin(java.lang.String interfaceName, java.lang.String a, java.lang.String b, java.lang.String c, java.lang.String d)
-
-
-
Method Detail
-
getBundle
@Deprecated(forRemoval=true, since="3.6") public static <T> T getBundle(java.lang.Class<T> type)Deprecated, for removal: This API element is subject to removal in a future version.UsegetBundle(Lookup,Class)instead to avoid errors in modular environments.Get a message bundle of the given type. Equivalent to.getBundle(type, Locale.getDefault())- Type Parameters:
T- the bundle type- Parameters:
type- the bundle type class- Returns:
- the bundle
-
getBundle
@Deprecated(forRemoval=true, since="3.6") public static <T> T getBundle(java.lang.Class<T> type, java.util.Locale locale)Deprecated, for removal: This API element is subject to removal in a future version.UsegetBundle(Lookup,Class,Locale)instead to avoid errors in modular environments.Get a message bundle of the given type.- Type Parameters:
T- the bundle type- Parameters:
type- the bundle type classlocale- the message locale to use- Returns:
- the bundle
-
getBundle
public static <T> T getBundle(java.lang.invoke.MethodHandles.Lookup lookup, java.lang.Class<T> type)Get a message bundle of the given type. Equivalent to.getBundle(type, Locale.getDefault())- Type Parameters:
T- the bundle type- Parameters:
lookup- a lookup which has access to the implementation class (usuallylookup())type- the bundle type class- Returns:
- the bundle
-
getBundle
public static <T> T getBundle(java.lang.invoke.MethodHandles.Lookup lookup, java.lang.Class<T> type, java.util.Locale locale)Get a message bundle of the given type.- Type Parameters:
T- the bundle type- Parameters:
lookup- a lookup which has access to the implementation class (usuallylookup())type- the bundle type classlocale- the message locale to use- Returns:
- the bundle
-
doGetBundle
private static <T> T doGetBundle(java.lang.invoke.MethodHandles.Lookup lookup, java.lang.Class<T> type, java.util.Locale locale)
-
join
private static java.lang.String join(java.lang.String interfaceName, java.lang.String a, java.lang.String b, java.lang.String c, java.lang.String d)
-
-