Package org.apache.juneau.cp
Class Messages.Builder
- Enclosing class:
- Messages
Builder class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSpecifies the base name patterns to use for finding the resource bundle.protected MessagesCreates 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
-
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.
-
impl
Description copied from class:BeanBuilderOverrides the bean returned by theBeanBuilder.build()method.Use this method if you want this builder to return an already-instantiated bean.
- Overrides:
implin classBeanBuilder<Messages>- Parameters:
value- The setting value.- Returns:
- This object.
-
locale
Specifies the locale.- Parameters:
value- The locale. Ifnull , the default locale is used.- Returns:
- This object.
-
locale
Specifies the locale.- Parameters:
value- 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.
-
name
Specifies the bundle name (e.g."Messages" ).- Parameters:
value- The bundle name.
Ifnull , the forClass class name is used.- Returns:
- This object.
-
parent
Adds a parent bundle.- Parameters:
value- The parent bundle. Can benull .- Returns:
- This object.
-
type
Description copied from class:BeanBuilderOverrides the bean type produced by theBeanBuilder.build()method.Use this method if you want to instantiated a bean subclass.
- Overrides:
typein classBeanBuilder<Messages>- Parameters:
value- The setting value.- Returns:
- This object.
-
buildDefault
Description copied from class:BeanBuilderCreates the bean when the bean type isnull or is the default value.- Overrides:
buildDefaultin classBeanBuilder<Messages>- Returns:
- A new bean.
-