com.puppycrawl.tools.checkstyle.api
Class LocalizedMessage
- Comparable
public final class LocalizedMessage
implements Comparable
Represents a message that can be localised. The translations come from
message.properties files. The underlying implementation uses
java.text.MessageFormat.
LocalizedMessage(int aLineNo, String aBundle, String aKey, Object[] aArgs, String aModuleId, Class aSourceClass) - Creates a new
LocalizedMessage instance.
|
LocalizedMessage(int aLineNo, String aBundle, String aKey, Object[] aArgs, SeverityLevel aSeverityLevel, String aModuleId, Class aSourceClass) - Creates a new
LocalizedMessage instance.
|
LocalizedMessage(int aLineNo, int aColNo, String aBundle, String aKey, Object[] aArgs, String aModuleId, Class aSourceClass) - Creates a new
LocalizedMessage instance.
|
LocalizedMessage(int aLineNo, int aColNo, String aBundle, String aKey, Object[] aArgs, SeverityLevel aSeverityLevel, String aModuleId, Class aSourceClass) - Creates a new
LocalizedMessage instance.
|
LocalizedMessage
public LocalizedMessage(int aLineNo,
String aBundle,
String aKey,
Object[] aArgs,
String aModuleId,
Class aSourceClass)
Creates a new LocalizedMessage
instance. The column number
defaults to 0.
aLineNo
- line number associated with the messageaBundle
- name of a resource bundle that contains error messagesaKey
- the key to locate the translationaArgs
- arguments for the translationaModuleId
- the id of the module the message is associated withaSourceClass
- the name of the source for the message
LocalizedMessage
public LocalizedMessage(int aLineNo,
String aBundle,
String aKey,
Object[] aArgs,
SeverityLevel aSeverityLevel,
String aModuleId,
Class aSourceClass)
Creates a new LocalizedMessage
instance.
aLineNo
- line number associated with the messageaBundle
- resource bundle nameaKey
- the key to locate the translationaArgs
- arguments for the translationaSeverityLevel
- severity level for the messageaModuleId
- the id of the module the message is associated withaSourceClass
- the source class for the message
LocalizedMessage
public LocalizedMessage(int aLineNo,
int aColNo,
String aBundle,
String aKey,
Object[] aArgs,
String aModuleId,
Class aSourceClass)
Creates a new LocalizedMessage
instance.
aLineNo
- line number associated with the messageaColNo
- column number associated with the messageaBundle
- resource bundle nameaKey
- the key to locate the translationaArgs
- arguments for the translationaModuleId
- the id of the module the message is associated withaSourceClass
- the Class that is the source of the message
LocalizedMessage
public LocalizedMessage(int aLineNo,
int aColNo,
String aBundle,
String aKey,
Object[] aArgs,
SeverityLevel aSeverityLevel,
String aModuleId,
Class aSourceClass)
Creates a new LocalizedMessage
instance.
aLineNo
- line number associated with the messageaColNo
- column number associated with the messageaBundle
- resource bundle nameaKey
- the key to locate the translationaArgs
- arguments for the translationaSeverityLevel
- severity level for the messageaModuleId
- the id of the module the message is associated withaSourceClass
- the Class that is the source of the message
compareTo
public int compareTo(Object aOther)
equals
public boolean equals(Object aObject)
getColumnNo
public int getColumnNo()
getKey
public String getKey()
Returns the message key to locate the translation, can also be used
in IDE plugins to map error messages to corrective actions.
getLineNo
public int getLineNo()
getMessage
public String getMessage()
getModuleId
public String getModuleId()
getSourceName
public String getSourceName()
- the name of the source for this LocalizedMessage
hashCode
public int hashCode()
setLocale
public static void setLocale(Locale aLocale)
aLocale
- the locale to use for localization *