xdoclet.tagshandler
Class PackageTagsHandler
public class PackageTagsHandler
Tags which manipulate package names and packages, including substitutions.
Version:
- Ara Abrahamian (ara_e@email.com)
- namespace = "Package"
- Oct 14, 2001
static class | PackageTagsHandler.PackageSubstitution - It's good practice to put interfaces (such as remote/local interfaces, data objects and home interfaces) in a
separate "interfaces" package rather than in the EJB bean implementation package.
|
void | forAllPackages(String template, Properties attributes) - Iterates over all packages loaded by XJavadoc.
|
static String | getPackageNameFor(String packageName) - Gets a package name with any subsitutions applied.
|
static String | getPackageNameFor(String packageName, boolean withSubstitution) - Apply package substitutions.
|
static String | getPackageNameFor(XPackage pak, boolean withSubstitution) - Gets the name of a package, optionally applying any substitutions.
|
static ArrayList | getPackageSubstitutions(String subtaskName) - Gets any PackageSubstitutions defined for a specified subtask.
|
String | packageName() - Returns the current package name.
|
String | packageNameAsPath() - Returns the current package name as a path.
|
static String | packageNameAsPathFor(String qualifiedName) - Returns a package name as a path, after applying any substitutions.
|
static String | packageNameAsPathFor(XPackage pak) - Returns a package name as a path, after applying any substitutions.
|
static String | packageNameAsPathWithoutSubstitutionFor(XPackage pak) - Returns a package name as a path, without applying any substitutions.
|
void | packageOf(String template) - Returns the not-full-qualified package name of the full-qualified class name specified in the body of this tag.
|
static String | replaceInline(String original, String oldOne, String newOne) - Replace the first occurrence of
oldOne in original with newOne , or returns
the original string if oldOne is not found.
|
checkForWrap , currentToken , exceptionList , firstSentenceDescriptionOfCurrentMember , forAllMemberTagTokens , forAllMemberTags , forAllMembers , getAllClasses , getClassNameFor , getFullClassNameFor , getFullSuperclassNameFor , getIndentChars , getXExecutableMemberForMemberName , getXExecutableMemberForMemberName , hasExecutableMember , hasExecutableMember_OLD , makeCopyOfArray , matchValue , memberComment , setMatchValue , skipToken |
delimit , expandClassName , generate , getCurrentClass , getCurrentClassTag , getCurrentConstructor , getCurrentField , getCurrentFieldTag , getCurrentMethod , getCurrentMethodTag , getCurrentPackage , getDocletContext , getEngine , getExpandedDelimitedTagValue , getTagValue , getTagValue , getTagValue , hasTag , isTagValueEqual , mandatoryParamNotFound , mandatoryTemplateTagParamNotFound , modifiers , popCurrentClass , pushCurrentClass , setCurrentClass , setCurrentClassTag , setCurrentConstructor , setCurrentField , setCurrentFieldTag , setCurrentMethod , setCurrentMethodTag , setCurrentPackage |
forAllPackages
public void forAllPackages(String template,
Properties attributes)
throws XDocletException
Iterates over all packages loaded by XJavadoc. Subsequent calls to forAllClasses will only iterate over the
classes in the current package.
template
- The body of the block tagattributes
- The attributes of the template tag
XDocletException
- Description of Exception
- type = "block"
- name = "abstract"
optional = "true"
values = "true,false"
description = "If true then accept
abstract classes also; otherwise don't."
- name = "type"
optional = "true"
description = "For all classes by the type."
- name = "extent"
optional = "true"
values = "concrete-type,superclass,hierarchy"
description = "Specifies the extent of the type search. If concrete-type then only check the concrete type, if
superclass then check also superclass, if hierarchy then search the whole hierarchy and find if the class is
of the specified type. Default is hierarchy."
getPackageNameFor
public static String getPackageNameFor(String packageName)
Gets a package name with any subsitutions applied.
packageName
- package name
- package name
getPackageNameFor
public static String getPackageNameFor(String packageName,
boolean withSubstitution)
Apply package substitutions. If useFirst is true , the first occurrence of substituteWith
will be replaced by packages , else the one of the direct container of the current class.
packageName
- The (current) package name, on which substitution shall take place.withSubstitution
- true if package substitutions shall take place.
- The package name after substitutions.
getPackageNameFor
public static String getPackageNameFor(XPackage pak,
boolean withSubstitution)
Gets the name of a package, optionally applying any substitutions.
pak
- packagewithSubstitution
- whether to apply any substitutions
- package name
getPackageSubstitutions
public static ArrayList getPackageSubstitutions(String subtaskName)
Gets any PackageSubstitutions defined for a specified subtask.
subtaskName
- subtask name
- ArrayList of substitutions
packageName
public String packageName()
throws XDocletException
Returns the current package name. If we're in the context of a package iteration, this is the name of the current
package. If we're in the context of a class iteration without a package iteration, return the name of the current
class' package.
- current package name
XDocletException
- Description of Exception
- type = "content"
packageNameAsPath
public String packageNameAsPath()
throws XDocletException
Returns the current package name as a path.
- current package name as path
XDocletException
- Description of Exception
- type = "content"
packageNameAsPathFor
public static String packageNameAsPathFor(String qualifiedName)
Returns a package name as a path, after applying any substitutions.
qualifiedName
- package name
- package name as path
- type = "content"
packageNameAsPathFor
public static String packageNameAsPathFor(XPackage pak)
Returns a package name as a path, after applying any substitutions.
pak
- package
- package name as path
- type = "content"
packageNameAsPathWithoutSubstitutionFor
public static String packageNameAsPathWithoutSubstitutionFor(XPackage pak)
Returns a package name as a path, without applying any substitutions.
pak
- package
- package name as path
- type = "content"
packageOf
public void packageOf(String template)
throws XDocletException
Returns the not-full-qualified package name of the full-qualified class name specified in the body of this tag.
template
- The body of the block tag
XDocletException
- Description of Exception
- type = "block"
replaceInline
public static String replaceInline(String original,
String oldOne,
String newOne)
Replace the first occurrence of oldOne
in original
with newOne
, or returns
the original string if oldOne
is not found.
original
- String in which replacement should occouroldOne
- String to be replacednewOne
- String that replaces
- String original string with replacements