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
Nested ClassesModifier and TypeClassDescriptionprotected final classInternal key storage.Nested classes/interfaces inherited from interface io.micronaut.context.MessageSource
MessageSource.MessageContext -
Field Summary
Fields inherited from interface io.micronaut.context.MessageSource
EMPTYFields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
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, waitMethods 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:MessageSourceInterpolate the given message template.- Specified by:
interpolatein interfaceMessageSource- Parameters:
template- The templatecontext- The context to use.- Returns:
- The interpolated message.
-