xdoclet
Class PackageSubstitution

java.lang.Object
  |
  +--xdoclet.PackageSubstitution

public class PackageSubstitution
extends Object

Uses JDK 1.4 java.util.regex to perform package substitutions. For example:

 foo.bar.ejb.MyBean
 from: ejb
 to: ejb.interfaces
 

Version:
$Revision: 1.6 $
Author:
Aslak Hellesøy

Constructor Summary
PackageSubstitution()
           
 
Method Summary
 String getSubstitutedPackageName(String packageName)
          Gets the substituted package name.
 void setFrom(String from)
          Sets the part of the package name to replace from.
 void setTo(String to)
          The String to replace with.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PackageSubstitution

public PackageSubstitution()
Method Detail

setFrom

public void setFrom(String from)
Sets the part of the package name to replace from. This can be a regexp.

Parameters:
from - the part of the package name to replace from

setTo

public void setTo(String to)
The String to replace with.

Parameters:
to - the String to replace with

getSubstitutedPackageName

public String getSubstitutedPackageName(String packageName)
Gets the substituted package name.

Parameters:
packageName - the package name to substitute.
Returns:
substituted package name or null if from was not matched.


Copyright © 2000-2003 XDoclet Team. All Rights Reserved.