Top Description Fields Constructors Methods
org.apache.tools.ant.util

public Class PackageNameMapper

extends GlobPatternMapper
Class Inheritance
Imports
java.io.File

Maps directory name matches into a dotted package name. This is useful for matching JUnit test cases against their XML formatter results.
<mapper classname="org.apache.tools.ant.util.PackageNameMapper"
        from="*Test.java" to="${test.data.dir}/TEST-*Test.xml"/>

Field Summary

Inherited from org.apache.tools.ant.util.GlobPatternMapper:
fromPostfixfromPrefixpostfixLengthprefixLengthtoPostfixtoPrefix

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected String

Returns:

Replaced variable part
extractVariablePart
(String
Source filename
name
)

Overrides org.apache.tools.ant.util.GlobPatternMapper.extractVariablePart.

Returns the part of the given string that matches the * in the "from" pattern replacing file separators with dots
Inherited from org.apache.tools.ant.util.GlobPatternMapper:
getHandleDirSepmapFileNamesetCaseSensitivesetFromsetHandleDirSepsetTo

Constructor Detail

PackageNameMapperback to summary
public PackageNameMapper()

Method Detail

extractVariablePartback to summary
protected String extractVariablePart(String name)

Overrides org.apache.tools.ant.util.GlobPatternMapper.extractVariablePart.

Returns the part of the given string that matches the * in the "from" pattern replacing file separators with dots

Parameters
name:String

Source filename

Returns:String

Replaced variable part

Annotations
@Override