Package io.micronaut.context
Class AbstractMessageSource
- java.lang.Object
-
- io.micronaut.context.AbstractMessageSource
-
- All Implemented Interfaces:
MessageSource,io.micronaut.core.order.Ordered
- Direct Known Subclasses:
ResourceBundleMessageSource,StaticMessageSource
public abstract class AbstractMessageSource extends java.lang.Object implements MessageSource
AbstractMessageSourceimplementation that provides basic message interpolation.- Since:
- 1.2
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classAbstractMessageSource.MessageKeyInternal 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
-
-
Constructor Summary
Constructors Constructor Description AbstractMessageSource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringinterpolate(java.lang.String template, 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
-
-
-
-
Method Detail
-
interpolate
@NonNull public java.lang.String interpolate(@NonNull java.lang.String template, @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.
-
-