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 java.lang.Object

Represents the `&lt;listener&gt;` element within the `&lt;junitlauncher&gt;` task

### Nested Class Summary

Nested Classes
`static class` `ListenerDefinition.ListenerType` defines available listener types.

### Constructor Summary

Constructors
`ListenerDefinition()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static ListenerDefinition` `fromForkedRepresentation​(javax.xml.stream.XMLStreamReader reader)`
`java.lang.String` `getClassName()`
`java.lang.String` `getOutputDir()`
`java.lang.String` `getResultFile()`
`boolean` `isUseLegacyReportingName()`
`void` `setClassName​(java.lang.String className)`
`void` `setIf​(java.lang.String ifProperty)`
`void` `setOutputDir​(java.lang.String dir)` Sets the output directory for this listener
`void` `setResultFile​(java.lang.String filename)`
`void` `setSendSysErr​(boolean sendSysErr)`
`void` `setSendSysOut​(boolean sendSysOut)`
`void` `setType​(ListenerDefinition.ListenerType type)`
`void` `setUnless​(java.lang.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 Detail

#### ListenerDefinition

    public ListenerDefinition()

### Method Detail

#### setClassName

    public void setClassName​(java.lang.String className)

#### getClassName

    public java.lang.String getClassName()

#### setIf

    public void setIf​(java.lang.String ifProperty)

#### setUnless

    public void setUnless​(java.lang.String unlessProperty)

#### setType

    public void setType​(ListenerDefinition.ListenerType type)

#### setResultFile

    public void setResultFile​(java.lang.String filename)

#### getResultFile

    public java.lang.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​(java.lang.String dir)

Sets the output directory for this listener

Parameters:
  `dir` - Path to the output directory
Since:
  Ant 1.10.6

#### getOutputDir

    public java.lang.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​(javax.xml.stream.XMLStreamReader reader)
                                                       throws javax.xml.stream.XMLStreamException

Throws:
  `javax.xml.stream.XMLStreamException`