Package org.apache.juneau.cp
Class Messages.Builder
- Enclosing class:
Messages
Builder class.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSpecifies the base name patterns to use for finding the resource bundle.protected Messages
Creates the bean when the bean type isnull or is the default value.Overrides the bean returned by theBeanBuilder.build()
method.Specifies the locale.Specifies the locale.Specifies a location of where to look for messages.Specifies a location of where to look for messages.Specifies the bundle name (e.g.Adds a parent bundle.Overrides the bean type produced by theBeanBuilder.build()
method.
-
Constructor Details
-
Builder
Constructor.- Parameters:
forClass
- The base class.
-
-
Method Details
-
buildDefault
Description copied from class:BeanBuilder
Creates the bean when the bean type isnull or is the default value.- Overrides:
buildDefault
in classBeanBuilder<Messages>
- Returns:
- A new bean.
-
parent
Adds a parent bundle.- Parameters:
parent
- The parent bundle. Can benull .- Returns:
- This object.
-
name
Specifies the bundle name (e.g."Messages" ).- Parameters:
name
- The bundle name.
Ifnull , the forClass class name is used.- Returns:
- This object.
-
baseNames
Specifies the base name patterns to use for finding the resource bundle.- Parameters:
baseNames
- The bundle base names.
The default is the following:"{package}.{name}" "{package}.i18n.{name}" "{package}.nls.{name}" "{package}.messages.{name}"
- Returns:
- This object.
-
locale
Specifies the locale.- Parameters:
locale
- The locale. Ifnull , the default locale is used.- Returns:
- This object.
-
locale
Specifies the locale.- Parameters:
locale
- The locale. Ifnull , the default locale is used.- Returns:
- This object.
-
location
Specifies a location of where to look for messages.- Parameters:
baseClass
- The base class.bundlePath
- The bundle path.- Returns:
- This object.
-
location
Specifies a location of where to look for messages.- Parameters:
bundlePath
- The bundle path.- Returns:
- This object.
-
impl
Description copied from class:BeanBuilder
Overrides the bean returned by theBeanBuilder.build()
method.Use this method if you want this builder to return an already-instantiated bean.
- Overrides:
impl
in classBeanBuilder<Messages>
- Parameters:
value
- The setting value.- Returns:
- This object.
-
type
Description copied from class:BeanBuilder
Overrides the bean type produced by theBeanBuilder.build()
method.Use this method if you want to instantiated a bean subclass.
- Overrides:
type
in classBeanBuilder<Messages>
- Parameters:
value
- The setting value.- Returns:
- This object.
-