org.apache.maven.shared.model.fileset.mappers
Class PackageNameMapper

java.lang.Object
  extended by org.apache.maven.shared.model.fileset.mappers.GlobPatternMapper
      extended by org.apache.maven.shared.model.fileset.mappers.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"/>
 

Version:
$Id: PackageNameMapper.html 886882 2013-11-16 21:55:43Z hboutemy $

Field Summary
 
Fields inherited from class org.apache.maven.shared.model.fileset.mappers.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.
 
Methods inherited from class org.apache.maven.shared.model.fileset.mappers.GlobPatternMapper
mapFileName, setCaseSensitive, setFrom, setHandleDirSep, 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.

Overrides:
extractVariablePart in class GlobPatternMapper
Parameters:
name - the source file name
Returns:
the variable part of the name


Copyright © 2002-2009 The Apache Software Foundation. All Rights Reserved.