|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.fikin.doclets.TemplateTools
public class TemplateTools
Typically an object of this class is exported to Velocity templates to
be used there. Varialbe name is $tools
Constructor Summary | |
---|---|
TemplateTools()
|
Method Summary | |
---|---|
boolean |
descendsFrom(com.sun.javadoc.ClassDoc cls,
java.lang.String fqClassName)
tests if this ClassDoc object extends or implements
the interface/superclass specified by fqClassName |
com.sun.javadoc.MethodDoc[] |
getAllMethods(com.sun.javadoc.ClassDoc cls)
collects all methods of that class, including its own and all inherited ones |
protected void |
getAllMethodsTraverse(com.sun.javadoc.ClassDoc cls,
java.util.Vector methods)
recursively travers class hierarchy and collects all methods into the vector makes sure that overwriten methods are not duplicated but only last one is present |
java.lang.Object |
getAntNestedElementCls(com.sun.javadoc.MethodDoc m,
com.sun.javadoc.ClassDoc cls)
get Ant Task nested element ClassDoc representing this element. |
java.lang.String |
getAntNestedElementName(com.sun.javadoc.MethodDoc m)
get Ant Task nested element name by removing "add" or "create" prefix from method's name and setting fist character to be lower case. |
protected com.sun.javadoc.Tag |
getFirstTag(com.sun.javadoc.Doc cls,
java.lang.String tagName)
search all tags and selects first one whose name is as asked |
java.lang.Object |
getFirstTagByName(com.sun.javadoc.Doc cls,
java.lang.String tagName)
search all tags and selects first one whose name is as asked |
com.sun.javadoc.MethodDoc[] |
getObjectMethods(com.sun.javadoc.ClassDoc cls)
get all methods (inherited ones too) and remove all overloaded ones |
com.sun.javadoc.ProgramElementDoc[] |
getOrderedObjectMethods(com.sun.javadoc.ClassDoc cls)
get all methods (inherited ones too) and remove all overloaded ones |
java.lang.String |
getSetterName(com.sun.javadoc.MethodDoc m)
get setter name by removing "set" prefix from method's name and setting fist character to be lower case. |
com.sun.javadoc.Tag[] |
getTagsByName(com.sun.javadoc.ClassDoc cls,
java.lang.String tagName)
search all tags and selects only those which name is as asked |
java.lang.String |
getTagText(com.sun.javadoc.Doc doc,
java.lang.String tagName,
java.lang.String defaultValue)
return tag's text or default value if not such tag found |
boolean |
isAntNestedElement(com.sun.javadoc.MethodDoc m)
test if this method is Ant Task nested element i.e. |
boolean |
isAntSetterMethod(com.sun.javadoc.MethodDoc m)
test if this method is an Ant setter method i.e. |
boolean |
isAntTaskClass(com.sun.javadoc.ClassDoc cls)
Test if given class is an Ant Task class i.e. |
boolean |
isSetter(com.sun.javadoc.MethodDoc m)
test if this method is setter i.e. |
java.lang.String |
lpad(java.lang.String text,
java.lang.String pad,
int len)
left-pad given text with pad until resulting len equals or become greater than the given len |
com.sun.javadoc.MethodDoc[] |
removeOverwitenMethods(com.sun.javadoc.MethodDoc[] methods)
removes all methods which has been deemed as overwriten |
java.lang.String |
rpad(java.lang.String text,
java.lang.String pad,
int len)
right-pad given text with pad until resulting len equals or become greater than the given len |
com.sun.javadoc.ProgramElementDoc[] |
sortByName(com.sun.javadoc.ProgramElementDoc[] list)
sorts elements by Name |
com.sun.javadoc.ProgramElementDoc[] |
sortByQualifiedName(com.sun.javadoc.ProgramElementDoc[] list)
sorts elements by qualifiedName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TemplateTools()
Method Detail |
---|
public boolean descendsFrom(com.sun.javadoc.ClassDoc cls, java.lang.String fqClassName)
ClassDoc
object extends or implements
the interface/superclass specified by fqClassName
cls
- is the class which is to be tested that implements given
interface or superclassfqClassName
- is the superclass or interface to be checked against
public com.sun.javadoc.Tag[] getTagsByName(com.sun.javadoc.ClassDoc cls, java.lang.String tagName)
cls
- to e inspectedtagName
- tag name to be searched for
public java.lang.Object getFirstTagByName(com.sun.javadoc.Doc cls, java.lang.String tagName)
cls
- to e inspectedtagName
- tag name to be searched for
protected com.sun.javadoc.Tag getFirstTag(com.sun.javadoc.Doc cls, java.lang.String tagName)
cls
- to e inspectedtagName
- tag name to be searched for
public java.lang.String getTagText(com.sun.javadoc.Doc doc, java.lang.String tagName, java.lang.String defaultValue)
doc
- tagName
- defaultValue
-
public com.sun.javadoc.MethodDoc[] getAllMethods(com.sun.javadoc.ClassDoc cls)
cls
-
protected void getAllMethodsTraverse(com.sun.javadoc.ClassDoc cls, java.util.Vector methods)
cls
- methods
- public com.sun.javadoc.MethodDoc[] removeOverwitenMethods(com.sun.javadoc.MethodDoc[] methods)
methods
-
public com.sun.javadoc.MethodDoc[] getObjectMethods(com.sun.javadoc.ClassDoc cls)
cls
- to inspect
public com.sun.javadoc.ProgramElementDoc[] getOrderedObjectMethods(com.sun.javadoc.ClassDoc cls)
cls
- to inspect
public com.sun.javadoc.ProgramElementDoc[] sortByQualifiedName(com.sun.javadoc.ProgramElementDoc[] list)
list
-
public com.sun.javadoc.ProgramElementDoc[] sortByName(com.sun.javadoc.ProgramElementDoc[] list)
list
-
public java.lang.String lpad(java.lang.String text, java.lang.String pad, int len)
text
- to left-padpad
- string to pad withlen
- resuting size string length
public java.lang.String rpad(java.lang.String text, java.lang.String pad, int len)
text
- to right-padpad
- string to pad withlen
- resuting size string length
public boolean isSetter(com.sun.javadoc.MethodDoc m)
m
-
public boolean isAntNestedElement(com.sun.javadoc.MethodDoc m)
m
-
public boolean isAntSetterMethod(com.sun.javadoc.MethodDoc m)
isSetter(MethodDoc)
is trueorg.apache.tools.ant.Task
methodorg.apache.tools.ant.ProjectComponent
methodjava.lang.Object
method
m
-
public boolean isAntTaskClass(com.sun.javadoc.ClassDoc cls)
descendsFrom(ClassDoc, String)
from org.apache.tools.ant.Task
cls
-
public java.lang.String getSetterName(com.sun.javadoc.MethodDoc m)
m
-
public java.lang.String getAntNestedElementName(com.sun.javadoc.MethodDoc m)
m
-
public java.lang.Object getAntNestedElementCls(com.sun.javadoc.MethodDoc m, com.sun.javadoc.ClassDoc cls)
m
- cls
- is some class, used to resolve the types
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |