PackageNameMapper (Apache Ant API)
Keywords: org.apache.tools.ant.util.PackageNameMapper class

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tools.ant.util
Class PackageNameMapper

    java.lang.Object
      org.apache.tools.ant.util.GlobPatternMapper
          org.apache.tools.ant.util.PackageNameMapper

All Implemented Interfaces:
  FileNameMapper

public class PackageNameMapper
extends GlobPatternMapper

Maps directory name matches into a dotted package name. This is useful for matching JUnit test cases againt their XML formatter results.

     <mapper classname="org.apache.tools.ant.util.PackageNameMapper"
             from="*Test.java" to="${test.data.dir}/TEST-*Test.xml"/>

Author:
  Erik Hatcher

Field Summary

Fields inherited from class org.apache.tools.ant.util.GlobPatternMapper
`fromPostfix, fromPrefix, postfixLength, prefixLength, toPostfix, toPrefix`

Constructor Summary
`PackageNameMapper()`

Method Summary
`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
`mapFileName, setFrom, setTo`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PackageNameMapper

    public PackageNameMapper()

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 class `GlobPatternMapper`
  Parameters:
    `name` - Source filename
  Returns:
    Replaced variable part

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2003 Apache Software Foundation. All Rights Reserved.