|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.puppycrawl.tools.checkstyle.api.LocalizedMessage
public final class LocalizedMessage
Represents a message that can be localised. The translations come from message.properties files. The underlying implementation uses java.text.MessageFormat.
Constructor Summary | |
---|---|
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(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. |
Method Summary | |
---|---|
int |
compareTo(Object aOther)
|
boolean |
equals(Object aObject)
|
int |
getColumnNo()
|
String |
getKey()
Returns the message key to locate the translation, can also be used in IDE plugins to map error messages to corrective actions. |
int |
getLineNo()
|
String |
getMessage()
|
SeverityLevel |
getSeverityLevel()
|
String |
getSourceName()
|
int |
hashCode()
|
static void |
setLocale(Locale aLocale)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LocalizedMessage(int aLineNo, int aColNo, String aBundle, String aKey, Object[] aArgs, SeverityLevel aSeverityLevel, Class aSourceClass)
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 messagepublic LocalizedMessage(int aLineNo, int aColNo, String aBundle, String aKey, Object[] aArgs, Class aSourceClass)
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 messagepublic LocalizedMessage(int aLineNo, String aBundle, String aKey, Object[] aArgs, SeverityLevel aSeverityLevel, Class aSourceClass)
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 messagepublic LocalizedMessage(int aLineNo, String aBundle, String aKey, Object[] aArgs, Class aSourceClass)
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 messageMethod Detail |
---|
public boolean equals(Object aObject)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String getMessage()
public int getLineNo()
public int getColumnNo()
public SeverityLevel getSeverityLevel()
public String getKey()
public String getSourceName()
public static void setLocale(Locale aLocale)
aLocale
- the locale to use for localizationpublic int compareTo(Object aOther)
compareTo
in interface Comparable
|
Back to the Checkstyle Home Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |