com.github.fge.msgsimple.provider
Class StaticMessageSourceProvider.Builder

java.lang.Object
  extended by com.github.fge.msgsimple.provider.StaticMessageSourceProvider.Builder
Enclosing class:
StaticMessageSourceProvider

@NotThreadSafe
public static final class StaticMessageSourceProvider.Builder
extends Object

Builder for a StaticMessageSourceProvider


Method Summary
 StaticMessageSourceProvider.Builder addSource(Locale locale, MessageSource source)
          Add a message source for a given locale
 MessageSourceProvider build()
          Build the message source provider
 StaticMessageSourceProvider.Builder setDefaultSource(MessageSource source)
          Set a default message source
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addSource

public StaticMessageSourceProvider.Builder addSource(Locale locale,
                                                     MessageSource source)
Add a message source for a given locale

Parameters:
locale - the locale
source - the message source
Returns:
this
Throws:
NullPointerException - either the locale or the source is null

setDefaultSource

public StaticMessageSourceProvider.Builder setDefaultSource(MessageSource source)
Set a default message source

Parameters:
source - the message source
Returns:
this
Throws:
NullPointerException - source is null

build

public MessageSourceProvider build()
Build the message source provider

Returns:
a StaticMessageSourceProvider