Class LocatedMessage
java.lang.Object
org.codehaus.groovy.control.messages.Message
org.codehaus.groovy.control.messages.SimpleMessage
org.codehaus.groovy.control.messages.LocatedMessage
- Direct Known Subclasses:
WarningMessage
A base class for compilation messages.
-
Field Summary
Fields inherited from class org.codehaus.groovy.control.messages.SimpleMessage
data, message, owner -
Constructor Summary
ConstructorsConstructorDescriptionLocatedMessage(String message, Object data, CSTNode context, SourceUnit source) Creates a located message with supplemental data.LocatedMessage(String message, CSTNode context, SourceUnit source) Creates a located message with the supplied text. -
Method Summary
Modifier and TypeMethodDescriptionReturns the CST node that identifies the message location.voidwrite(PrintWriter writer, Janitor janitor) Writes the message together with source-location information.Methods inherited from class org.codehaus.groovy.control.messages.SimpleMessage
getMessage
-
Constructor Details
-
LocatedMessage
Creates a located message with the supplied text.- Parameters:
message- the message textcontext- the source locationsource- the owning source unit
-
LocatedMessage
Creates a located message with supplemental data.- Parameters:
message- the message textdata- supplemental message datacontext- the source locationsource- the owning source unit
-
-
Method Details
-
getContext
Returns the CST node that identifies the message location.- Returns:
- the source location node
-
write
Writes the message together with source-location information.- Overrides:
writein classSimpleMessage- Parameters:
writer- the destination writerjanitor- the cleanup helper for temporary source access
-