ListenerDefinition (Apache Ant API)
Description: declaration: package: org.apache.tools.ant.taskdefs.optional.junitlauncher.confined, class: ListenerDefinition

Package org.apache.tools.ant.taskdefs.optional.junitlauncher.confined

# Class ListenerDefinition

java.lang.Object
org.apache.tools.ant.taskdefs.optional.junitlauncher.confined.ListenerDefinition

public class ListenerDefinition extends Object
Represents the `&lt;listener&gt;` element within the `&lt;junitlauncher&gt;` task

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `ListenerDefinition.ListenerType`
  defines available listener types.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ListenerDefinition()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static ListenerDefinition`
  `fromForkedRepresentation​(XMLStreamReader reader)`
  `String`
  `getClassName()`
  `String`
  `getOutputDir()`
  `String`
  `getResultFile()`
  `boolean`
  `isUseLegacyReportingName()`
  `void`
  `setClassName​(String className)`
  `void`
  `setIf​(String ifProperty)`
  `void`
  `setOutputDir​(String dir)`
  Sets the output directory for this listener
  `void`
  `setResultFile​(String filename)`
  `void`
  `setSendSysErr​(boolean sendSysErr)`
  `void`
  `setSendSysOut​(boolean sendSysOut)`
  `void`
  `setType​(ListenerDefinition.ListenerType type)`
  `void`
  `setUnless​(String unlessProperty)`
  `void`
  `setUseLegacyReportingName​(boolean useLegacyReportingName)`
  Set the test identifier reporting style
  `boolean`
  `shouldSendSysErr()`
  `boolean`
  `shouldSendSysOut()`
  `boolean`
  `shouldUse​(Project project)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ListenerDefinition

    public ListenerDefinition()

- ## Method Details

  - ### setClassName

    public void setClassName​(String className)

  - ### getClassName

    public String getClassName()

  - ### setIf

    public void setIf​(String ifProperty)

  - ### setUnless

    public void setUnless​(String unlessProperty)

  - ### setType

    public void setType​(ListenerDefinition.ListenerType type)

  - ### setResultFile

    public void setResultFile​(String filename)

  - ### getResultFile

    public String getResultFile()

  - ### setSendSysOut

    public void setSendSysOut​(boolean sendSysOut)

  - ### shouldSendSysOut

    public boolean shouldSendSysOut()

  - ### setSendSysErr

    public void setSendSysErr​(boolean sendSysErr)

  - ### shouldSendSysErr

    public boolean shouldSendSysErr()

  - ### setOutputDir

    public void setOutputDir​(String dir)
    Sets the output directory for this listener
    Parameters:
      `dir` - Path to the output directory
    Since:
      Ant 1.10.6

  - ### getOutputDir

    public String getOutputDir()

  - ### isUseLegacyReportingName

    public boolean isUseLegacyReportingName()
    Returns:
      Returns `true` if legacy reporting name (JUnit 4 style) is to be used. Else returns `false`.
    Since:
      Ant 1.10.10

  - ### setUseLegacyReportingName

    public void setUseLegacyReportingName​(boolean useLegacyReportingName)
    Set the test identifier reporting style
    Parameters:
      `useLegacyReportingName` - `true` if legacy reporting name (JUnit 4 style) is to be used. Else `false`.
    Since:
      Ant 1.10.10

  - ### shouldUse

    public boolean shouldUse​(Project project)

  - ### fromForkedRepresentation

    public static ListenerDefinition fromForkedRepresentation​(XMLStreamReader reader) throws XMLStreamException
    Throws:
      `XMLStreamException`