com.puppycrawl.tools.checkstyle.api
Class LocalizedMessage
java.lang.Object
com.puppycrawl.tools.checkstyle.api.LocalizedMessage
- Comparable
public final class LocalizedMessage
extends java.lang.Object
implements Comparable
Represents a message that can be localised. The translations come from
message.properties files. The underlying implementation uses
java.text.MessageFormat.
Version:
- Oliver Burn
- lkuehne
LocalizedMessage(int aLineNo, String aBundle, String aKey, Object[] aArgs, Class aSourceClass) - Creates a new
LocalizedMessage instance.
|
LocalizedMessage(int aLineNo, String aBundle, String aKey, Object[] aArgs, SeverityLevel aSeverityLevel, Class aSourceClass) - Creates a new
LocalizedMessage instance.
|
LocalizedMessage(int aLineNo, int aColNo, String aBundle, String aKey, Object[] aArgs, Class aSourceClass) - Creates a new
LocalizedMessage instance.
|
LocalizedMessage(int aLineNo, int aColNo, String aBundle, String aKey, Object[] aArgs, SeverityLevel aSeverityLevel, Class aSourceClass) - Creates a new
LocalizedMessage instance.
|
LocalizedMessage
public LocalizedMessage(int aLineNo,
String aBundle,
String aKey,
Object[] aArgs,
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 translationaSourceClass
- the name of the source for the message
LocalizedMessage
public LocalizedMessage(int aLineNo,
String aBundle,
String aKey,
Object[] aArgs,
SeverityLevel aSeverityLevel,
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 messageaSourceClass
- the source class for the message
LocalizedMessage
public LocalizedMessage(int aLineNo,
int aColNo,
String aBundle,
String aKey,
Object[] aArgs,
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 translationaSourceClass
- the Class that is the source of the message
LocalizedMessage
public LocalizedMessage(int aLineNo,
int aColNo,
String aBundle,
String aKey,
Object[] aArgs,
SeverityLevel aSeverityLevel,
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 messageaSourceClass
- the Class that is the source of the message
compareTo
public int compareTo(Object aOther)
*
equals
public boolean equals(Object aObject)
Object.equals
getColumnNo
public int getColumnNo()
- the column number *
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.
- the message key
getLineNo
public int getLineNo()
- the line number *
getMessage
public String getMessage()
- the translated message *
getSeverityLevel
public SeverityLevel getSeverityLevel()
- the severity level *
getSourceName
public String getSourceName()
- the name of the source for this LocalizedMessage
hashCode
public int hashCode()
Object.hashCode
setLocale
public static void setLocale(Locale aLocale)
aLocale
- the locale to use for localization *