Class SpecMessage


  • public class SpecMessage
    extends java.lang.Object
    An output message generated by Crystal Palace
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String message
      string contents of the output
      static int MESSAGE_ECHO
      echo message
      static int MESSAGE_WARN
      warning message (not an error)
      protected crystalpalace.spec.SpecProgram source
      the source of the message
      protected int type
      type of the message
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected SpecMessage​(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 SpecMessage Echo​(crystalpalace.spec.SpecProgram source, java.lang.String message)
      Log a message for the echo command
      java.lang.String getFileName()
      Get the shortname of the file where this message occured.
      java.lang.String getMessage()
      Get the contents of this log message
      java.lang.String getTarget()
      Get the label context from our current Spec program (e.g., x86, x64)
      int getType()
      Get the type of this log message
      java.lang.String toString()
      Format our message into a pleasing enough string representation
      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)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • 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 from
        message - the contents of the output
        type - 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 of run "file.spec"--the file associated with this message may differ from the top-level .spec file that was run via LinkSpec
        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 program
        message - 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 program
        message - 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:
        toString in class java.lang.Object
        Returns:
        string representation of this message