Package org.codehaus.plexus.compiler
Class CompilerMessage
java.lang.Object
org.codehaus.plexus.compiler.CompilerMessage
This class encapsulates a message produced by a programming language
processor (whether interpreted or compiled).
- Since:
- 2.0
- Author:
- Stefano Mazzocchi
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
As we are still 1.5 required we use a wrapper to Diagnostic.Kind and some compilers don't know jdk constants. -
Constructor Summary
ConstructorDescriptionCompilerMessage
(String message) Deprecated.CompilerMessage
(String message, boolean error) Deprecated.UseCompilerMessage(String, Kind)
insteadCompilerMessage
(String file, boolean error, int startline, int startcolumn, int endline, int endcolumn, String message) Deprecated.CompilerMessage
(String message, CompilerMessage.Kind kind) Constructs a compiler message.CompilerMessage
(String file, CompilerMessage.Kind kind, int startline, int startcolumn, int endline, int endcolumn, String message) Constructs a compiler message. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the ending column number of the program text originating this compiler message.int
Return the ending line number of the program text originating this compiler message.getFile()
Returns the filename associated with this compiler message.getKind()
Returns the kind of the compiler message.Returns the message produced by the language processor.int
Returns the starting column number of the program text originating this compiler message.int
Returns the starting line number of the program text originating this compiler message.boolean
isError()
Asserts whether this is an error message or not.toString()
-
Constructor Details
-
CompilerMessage
@Deprecated public CompilerMessage(String file, boolean error, int startline, int startcolumn, int endline, int endcolumn, String message) Deprecated.Constructs a compiler message.- Parameters:
file
- The name of the file containing the offending program texterror
-true
if this is a error message, orfalse
if it is a warning messagestartline
- The start line number of the offending program textstartcolumn
- The start column number of the offending program textendline
- The end line number of the offending program textendcolumn
- The end column number of the offending program textmessage
- The actual message text produced by the language processor
-
CompilerMessage
public CompilerMessage(String file, CompilerMessage.Kind kind, int startline, int startcolumn, int endline, int endcolumn, String message) Constructs a compiler message.- Parameters:
file
- The name of the file containing the offending program textkind
- The kind of messagestartline
- The start line number of the offending program textstartcolumn
- The start column number of the offending program textendline
- The end line number of the offending program textendcolumn
- The end column number of the offending program textmessage
- The actual message text produced by the language processor
-
CompilerMessage
Deprecated.UseCompilerMessage(String, Kind)
insteadThe warning message constructor.- Parameters:
message
- The actual message text produced by the language processor
-
CompilerMessage
Deprecated.UseCompilerMessage(String, Kind)
insteadConstructs a compiler message.- Parameters:
message
- The actual message text produced by the language processorerror
-true
if this is a error message, orfalse
if it is a warning message
-
CompilerMessage
Constructs a compiler message.- Parameters:
message
- The actual message text produced by the language processorkind
- The kind of message- Since:
- 2.0
-
-
Method Details
-
getFile
Returns the filename associated with this compiler message.- Returns:
- The filename associated with this compiler message
-
isError
public boolean isError()Asserts whether this is an error message or not.- Returns:
- Whether the message is an error message
-
getStartLine
public int getStartLine()Returns the starting line number of the program text originating this compiler message.- Returns:
- The starting line number of the program text originating this message
-
getStartColumn
public int getStartColumn()Returns the starting column number of the program text originating this compiler message.- Returns:
- The starting column number of the program text originating this message
-
getEndLine
public int getEndLine()Return the ending line number of the program text originating this compiler message.- Returns:
- The ending line number of the program text originating this message
-
getEndColumn
public int getEndColumn()Returns the ending column number of the program text originating this compiler message.- Returns:
- The ending column number of the program text originating this message
-
getMessage
Returns the message produced by the language processor.- Returns:
- The message produced by the language processor
-
getKind
Returns the kind of the compiler message.- Returns:
- the kind of the message
- Since:
- 2.0
-
toString
-
CompilerMessage(String, Kind)
instead