Package crystalpalace.spec
Class SpecMessage
- java.lang.Object
-
- crystalpalace.spec.SpecMessage
-
public class SpecMessage extends java.lang.ObjectAn output message generated by Crystal Palace
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Stringmessagestring contents of the outputstatic intMESSAGE_ECHOecho messagestatic intMESSAGE_WARNwarning message (not an error)protected crystalpalace.spec.SpecProgramsourcethe source of the messageprotected inttypetype of the message
-
Constructor Summary
Constructors Modifier Constructor Description protectedSpecMessage(crystalpalace.spec.SpecProgram source, java.lang.String message, int type)Instantiate a new message
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SpecMessageEcho(crystalpalace.spec.SpecProgram source, java.lang.String message)Log a message for the echo commandjava.lang.StringgetFileName()Get the shortname of the file where this message occured.java.lang.StringgetMessage()Get the contents of this log messagejava.lang.StringgetTarget()Get the label context from our current Spec program (e.g., x86, x64)intgetType()Get the type of this log messagejava.lang.StringtoString()Format our message into a pleasing enough string representationstatic SpecMessageWarn(crystalpalace.spec.SpecProgram source, java.lang.String message)Log a warning message (e.g., something the user should know, but shouldn't halt the linking process)
-
-
-
Field Detail
-
MESSAGE_ECHO
public static final int MESSAGE_ECHO
echo message- See Also:
- Constant Field Values
-
MESSAGE_WARN
public static final int MESSAGE_WARN
warning message (not an error)- See Also:
- Constant Field Values
-
source
protected crystalpalace.spec.SpecProgram source
the source of the message
-
message
protected java.lang.String message
string contents of the output
-
type
protected int type
type of the message
-
-
Constructor Detail
-
SpecMessage
protected SpecMessage(crystalpalace.spec.SpecProgram source, java.lang.String message, int type)Instantiate a new message- Parameters:
source- the program this message came frommessage- the contents of the outputtype- the type of message (e.g.,MESSAGE_ECHO)
-
-
Method Detail
-
getMessage
public java.lang.String getMessage()
Get the contents of this log message- Returns:
- the contents of our log message
-
getType
public int getType()
Get the type of this log message- Returns:
- the message type (e.g.,
MESSAGE_ECHO)
-
getTarget
public java.lang.String getTarget()
Get the label context from our current Spec program (e.g., x86, x64)- Returns:
- the label target string
-
getFileName
public java.lang.String getFileName()
Get the shortname of the file where this message occured. In the case ofrun "file.spec"--the file associated with this message may differ from the top-level .spec file that was run viaLinkSpec- Returns:
- the short file name associated where this error occured.
-
Echo
public static SpecMessage Echo(crystalpalace.spec.SpecProgram source, java.lang.String message)
Log a message for the echo command- Parameters:
source- the source programmessage- the message contents- Returns:
- an object containing this message
-
Warn
public static SpecMessage Warn(crystalpalace.spec.SpecProgram source, java.lang.String message)
Log a warning message (e.g., something the user should know, but shouldn't halt the linking process)- Parameters:
source- the source programmessage- the message contents- Returns:
- an object containing this message
-
toString
public java.lang.String toString()
Format our message into a pleasing enough string representation- Overrides:
toStringin classjava.lang.Object- Returns:
- string representation of this message
-
-