Class AbstractFindBugsTask

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static long DEFAULT_TIMEOUT  
      protected java.lang.String errorProperty  
      java.lang.String execResultProperty  
      static java.lang.String FINDBUGS_JAR  
      static java.lang.String RESULT_PROPERTY_SUFFIX  
      • Fields inherited from class org.apache.tools.ant.Task

        target, taskName, taskType, wrapper
      • Fields inherited from class org.apache.tools.ant.ProjectComponent

        description, location, project
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractFindBugsTask​(java.lang.String mainClass)
      Constructor.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected void addArg​(java.lang.String arg)
      Add an argument to the JVM used to execute FindBugs.
      protected void afterExecuteJavaProcess​(int rc)  
      protected abstract void beforeExecuteJavaProcess()  
      protected void checkParameters()
      Check that all required attributes have been set.
      protected abstract void configureFindbugsEngine()  
      org.apache.tools.ant.types.Path createClasspath()
      Path to use for classpath.
      protected void createFindbugsEngine()
      Create the FindBugs engine (the Java process that will run whatever FindBugs-related program this task is going to execute).
      org.apache.tools.ant.types.Path createPluginList()
      Path to use for plugin list.
      AbstractFindBugsTask.SystemProperty createSystemProperty()
      Create a SystemProperty (to handle <systemProperty> elements).
      void execute()  
      protected boolean getDebug()
      Get the debug flag.
      protected org.apache.tools.ant.taskdefs.Java getFindbugsEngine()
      Get the Findbugs engine.
      void setClasspath​(org.apache.tools.ant.types.Path src)
      Set the classpath to use.
      void setClasspathRef​(org.apache.tools.ant.types.Reference r)
      Adds a reference to a classpath defined elsewhere.
      void setDebug​(boolean flag)
      Set the debug flag
      void setErrorProperty​(java.lang.String name)
      Tells this task to set the property with the given name to "true" when there were errors.
      void setFailOnError​(boolean flag)
      Set the failOnError flag
      void setHome​(java.io.File homeDir)
      Set the home directory into which findbugs was installed
      protected void setInputString​(java.lang.String input)
      Sets the given string to be piped to standard input of the FindBugs JVM upon launching.
      void setJvm​(java.lang.String jvm)
      Set the command used to start the VM
      void setJvmargs​(java.lang.String args)
      Set any specific jvm args
      void setPluginList​(org.apache.tools.ant.types.Path src)
      the plugin list to use.
      void setPluginListRef​(org.apache.tools.ant.types.Reference r)
      Adds a reference to a plugin list defined elsewhere.
      void setTimeout​(long timeout)
      Set timeout in milliseconds.
      • Methods inherited from class org.apache.tools.ant.Task

        bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
      • Methods inherited from class org.apache.tools.ant.ProjectComponent

        clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
      • Methods inherited from class java.lang.Object

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

      • RESULT_PROPERTY_SUFFIX

        public static final java.lang.String RESULT_PROPERTY_SUFFIX
        See Also:
        Constant Field Values
      • errorProperty

        protected java.lang.String errorProperty
      • execResultProperty

        public java.lang.String execResultProperty
    • Constructor Detail

      • AbstractFindBugsTask

        protected AbstractFindBugsTask​(java.lang.String mainClass)
        Constructor.
    • Method Detail

      • setHome

        public void setHome​(java.io.File homeDir)
        Set the home directory into which findbugs was installed
      • setDebug

        public void setDebug​(boolean flag)
        Set the debug flag
      • getDebug

        protected boolean getDebug()
        Get the debug flag.
      • setJvmargs

        public void setJvmargs​(java.lang.String args)
        Set any specific jvm args
      • setJvm

        public void setJvm​(java.lang.String jvm)
        Set the command used to start the VM
      • setTimeout

        public void setTimeout​(long timeout)
        Set timeout in milliseconds.
        Parameters:
        timeout - the timeout
      • setFailOnError

        public void setFailOnError​(boolean flag)
        Set the failOnError flag
      • setErrorProperty

        public void setErrorProperty​(java.lang.String name)
        Tells this task to set the property with the given name to "true" when there were errors.
      • setClasspath

        public void setClasspath​(org.apache.tools.ant.types.Path src)
        Set the classpath to use.
      • createClasspath

        public org.apache.tools.ant.types.Path createClasspath()
        Path to use for classpath.
      • setClasspathRef

        public void setClasspathRef​(org.apache.tools.ant.types.Reference r)
        Adds a reference to a classpath defined elsewhere.
      • setPluginList

        public void setPluginList​(org.apache.tools.ant.types.Path src)
        the plugin list to use.
      • createPluginList

        public org.apache.tools.ant.types.Path createPluginList()
        Path to use for plugin list.
      • setPluginListRef

        public void setPluginListRef​(org.apache.tools.ant.types.Reference r)
        Adds a reference to a plugin list defined elsewhere.
      • execute

        public void execute()
                     throws org.apache.tools.ant.BuildException
        Overrides:
        execute in class org.apache.tools.ant.Task
        Throws:
        org.apache.tools.ant.BuildException
      • checkParameters

        protected void checkParameters()
        Check that all required attributes have been set.
      • createFindbugsEngine

        protected void createFindbugsEngine()
        Create the FindBugs engine (the Java process that will run whatever FindBugs-related program this task is going to execute).
      • getFindbugsEngine

        protected org.apache.tools.ant.taskdefs.Java getFindbugsEngine()
        Get the Findbugs engine.
      • addArg

        protected void addArg​(java.lang.String arg)
        Add an argument to the JVM used to execute FindBugs.
        Parameters:
        arg - the argument
      • setInputString

        protected void setInputString​(java.lang.String input)
        Sets the given string to be piped to standard input of the FindBugs JVM upon launching.
      • configureFindbugsEngine

        protected abstract void configureFindbugsEngine()
      • beforeExecuteJavaProcess

        protected abstract void beforeExecuteJavaProcess()
      • afterExecuteJavaProcess

        protected void afterExecuteJavaProcess​(int rc)