|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.context.support.DefaultMessageSourceResolvable
public class DefaultMessageSourceResolvable
Default implementation of the MessageSourceResolvable
interface.
Offers an easy way to store all the necessary values needed to resolve
a message via a MessageSource
.
MessageSource.getMessage(MessageSourceResolvable, java.util.Locale)
,
Serialized FormConstructor Summary | |
---|---|
DefaultMessageSourceResolvable(MessageSourceResolvable resolvable)
Copy constructor: Create a new instance from another resolvable. |
|
DefaultMessageSourceResolvable(String code)
Create a new DefaultMessageSourceResolvable. |
|
DefaultMessageSourceResolvable(String[] codes)
Create a new DefaultMessageSourceResolvable. |
|
DefaultMessageSourceResolvable(String[] codes,
Object[] arguments)
Create a new DefaultMessageSourceResolvable. |
|
DefaultMessageSourceResolvable(String[] codes,
Object[] arguments,
String defaultMessage)
Create a new DefaultMessageSourceResolvable. |
|
DefaultMessageSourceResolvable(String[] codes,
String defaultMessage)
Create a new DefaultMessageSourceResolvable. |
Method Summary | |
---|---|
boolean |
equals(Object other)
|
Object[] |
getArguments()
Return the array of arguments to be used to resolve this message. |
String |
getCode()
Return the default code of this resolvable, that is, the last one in the codes array. |
String[] |
getCodes()
Return the codes to be used to resolve this message, in the order that they should get tried. |
String |
getDefaultMessage()
Return the default message to be used to resolve this message. |
int |
hashCode()
|
protected String |
resolvableToString()
Build a default String representation for this MessageSourceResolvable: including codes, arguments, and default message. |
String |
toString()
Default implementation exposes the attributes of this MessageSourceResolvable. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DefaultMessageSourceResolvable(String code)
code
- the code to be used to resolve this messagepublic DefaultMessageSourceResolvable(String[] codes)
codes
- the codes to be used to resolve this messagepublic DefaultMessageSourceResolvable(String[] codes, String defaultMessage)
codes
- the codes to be used to resolve this messagedefaultMessage
- the default message to be used to resolve this messagepublic DefaultMessageSourceResolvable(String[] codes, Object[] arguments)
codes
- the codes to be used to resolve this messagearguments
- the array of arguments to be used to resolve this messagepublic DefaultMessageSourceResolvable(String[] codes, Object[] arguments, String defaultMessage)
codes
- the codes to be used to resolve this messagearguments
- the array of arguments to be used to resolve this messagedefaultMessage
- the default message to be used to resolve this messagepublic DefaultMessageSourceResolvable(MessageSourceResolvable resolvable)
resolvable
- the resolvable to copy fromMethod Detail |
---|
public String[] getCodes()
MessageSourceResolvable
getCodes
in interface MessageSourceResolvable
public String getCode()
public Object[] getArguments()
MessageSourceResolvable
getArguments
in interface MessageSourceResolvable
MessageFormat
public String getDefaultMessage()
MessageSourceResolvable
getDefaultMessage
in interface MessageSourceResolvable
null
if no defaultprotected final String resolvableToString()
public String toString()
resolvableToString()
.
toString
in class Object
resolvableToString()
public boolean equals(Object other)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |