org.apache.tools.ant.utilClass PackageNameMapper
- java.lang.Object
- org.apache.tools.ant.util.GlobPatternMapper
- org.apache.tools.ant.util.PackageNameMapper
- All Implemented Interfaces:
- FileNameMapper
public class PackageNameMapper extends GlobPatternMapperMaps 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
Fields inherited from class org.apache.tools.ant.util.GlobPatternMapper
fromPostfix, fromPrefix, postfixLength, prefixLength, toPostfix, toPrefix
Constructor Summary
Constructors Constructor and Description PackageNameMapper()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description protected java.lang.String
extractVariablePart(java.lang.String name)
Returns the part of the given string that matches the * in the "from" pattern replacing file separators with dots
Methods inherited from class org.apache.tools.ant.util.GlobPatternMapper
getHandleDirSep, mapFileName, setCaseSensitive, setFrom, setHandleDirSep, setTo
Method Detail
extractVariablePart
protected java.lang.String extractVariablePart(java.lang.String name)Returns the part of the given string that matches the * in the "from" pattern replacing file separators with dots
- Overrides:
extractVariablePart
in classGlobPatternMapper
- Parameters:
name
- Source filename- Returns:
- Replaced variable part