Package io.micronaut.context
Class AbstractMessageSource
java.lang.Object
io.micronaut.context.AbstractMessageSource
- All Implemented Interfaces:
MessageSource
,Ordered
- Direct Known Subclasses:
CompositeMessageSource
,ResourceBundleMessageSource
,StaticMessageSource
Abstract
MessageSource
implementation that provides basic message interpolation.- Since:
- 1.2
- Author:
- graemerocher
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected final class
Internal key storage.Nested classes/interfaces inherited from interface io.micronaut.context.MessageSource
MessageSource.MessageContext
-
Field Summary
Fields inherited from interface io.micronaut.context.MessageSource
EMPTY
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioninterpolate
(@NonNull String template, @NonNull MessageSource.MessageContext context) Interpolate the given message template.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.context.MessageSource
getMessage, getMessage, getMessage, getMessage, getMessage, getMessage, getMessage, getMessage, getRawMessage, getRawMessage, getRequiredMessage, getRequiredRawMessage
-
Constructor Details
-
AbstractMessageSource
public AbstractMessageSource()
-
-
Method Details
-
interpolate
@NonNull public @NonNull String interpolate(@NonNull @NonNull String template, @NonNull @NonNull MessageSource.MessageContext context) Description copied from interface:MessageSource
Interpolate the given message template.- Specified by:
interpolate
in interfaceMessageSource
- Parameters:
template
- The templatecontext
- The context to use.- Returns:
- The interpolated message.
-