Class CustomAntLogger

  • All Implemented Interfaces:
    java.util.EventListener, org.apache.tools.ant.BuildListener, org.apache.tools.ant.BuildLogger

    public class CustomAntLogger
    extends java.lang.Object
    implements org.apache.tools.ant.BuildLogger
    ANT-Message Handler.
    Author:
    Sebastian Bender
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.HashMap<java.lang.Integer,​java.lang.String> messages  
    • Constructor Summary

      Constructors 
      Constructor Description
      CustomAntLogger()
      Creates a custom ANT logger.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void buildFinished​(org.apache.tools.ant.BuildEvent event)  
      void buildStarted​(org.apache.tools.ant.BuildEvent event)  
      java.util.HashMap<java.lang.Integer,​java.lang.String> getMessages()
      Returns the collected errors.
      void messageLogged​(org.apache.tools.ant.BuildEvent event)  
      void setEmacsMode​(boolean emacs)  
      void setErrorPrintStream​(java.io.PrintStream stream)  
      void setMessageOutputLevel​(int level)  
      void setMessages​(java.util.HashMap<java.lang.Integer,​java.lang.String> errors)
      Defines the errors to be set.
      void setOutputPrintStream​(java.io.PrintStream stream)  
      void targetFinished​(org.apache.tools.ant.BuildEvent event)  
      void targetStarted​(org.apache.tools.ant.BuildEvent event)  
      void taskFinished​(org.apache.tools.ant.BuildEvent event)  
      void taskStarted​(org.apache.tools.ant.BuildEvent event)  
      • Methods inherited from class java.lang.Object

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

      • messages

        private java.util.HashMap<java.lang.Integer,​java.lang.String> messages
    • Constructor Detail

      • CustomAntLogger

        CustomAntLogger()
        Creates a custom ANT logger.
    • Method Detail

      • messageLogged

        public void messageLogged​(org.apache.tools.ant.BuildEvent event)
        Specified by:
        messageLogged in interface org.apache.tools.ant.BuildListener
      • getMessages

        public java.util.HashMap<java.lang.Integer,​java.lang.String> getMessages()
        Returns the collected errors.
        Returns:
        the errors
      • setMessages

        public void setMessages​(java.util.HashMap<java.lang.Integer,​java.lang.String> errors)
        Defines the errors to be set.
        Parameters:
        errors - the errors to set
      • buildFinished

        public void buildFinished​(org.apache.tools.ant.BuildEvent event)
        Specified by:
        buildFinished in interface org.apache.tools.ant.BuildListener
      • buildStarted

        public void buildStarted​(org.apache.tools.ant.BuildEvent event)
        Specified by:
        buildStarted in interface org.apache.tools.ant.BuildListener
      • targetFinished

        public void targetFinished​(org.apache.tools.ant.BuildEvent event)
        Specified by:
        targetFinished in interface org.apache.tools.ant.BuildListener
      • targetStarted

        public void targetStarted​(org.apache.tools.ant.BuildEvent event)
        Specified by:
        targetStarted in interface org.apache.tools.ant.BuildListener
      • taskFinished

        public void taskFinished​(org.apache.tools.ant.BuildEvent event)
        Specified by:
        taskFinished in interface org.apache.tools.ant.BuildListener
      • taskStarted

        public void taskStarted​(org.apache.tools.ant.BuildEvent event)
        Specified by:
        taskStarted in interface org.apache.tools.ant.BuildListener
      • setEmacsMode

        public void setEmacsMode​(boolean emacs)
        Specified by:
        setEmacsMode in interface org.apache.tools.ant.BuildLogger
      • setErrorPrintStream

        public void setErrorPrintStream​(java.io.PrintStream stream)
        Specified by:
        setErrorPrintStream in interface org.apache.tools.ant.BuildLogger
      • setMessageOutputLevel

        public void setMessageOutputLevel​(int level)
        Specified by:
        setMessageOutputLevel in interface org.apache.tools.ant.BuildLogger
      • setOutputPrintStream

        public void setOutputPrintStream​(java.io.PrintStream stream)
        Specified by:
        setOutputPrintStream in interface org.apache.tools.ant.BuildLogger