org.apache.velocity.tools.generic
Class ClassTool.CallableSub<T extends ClassTool.CallableSub>

java.lang.Object
  extended by org.apache.velocity.tools.generic.ClassTool.Sub<T>
      extended by org.apache.velocity.tools.generic.ClassTool.CallableSub<T>
All Implemented Interfaces:
java.lang.Comparable<T>
Direct Known Subclasses:
ClassTool.ConstructorSub, ClassTool.MethodSub
Enclosing class:
ClassTool

public abstract static class ClassTool.CallableSub<T extends ClassTool.CallableSub>
extends ClassTool.Sub<T>


Field Summary
protected  java.lang.String javadocRef
           
protected  java.lang.String signature
           
protected  java.lang.String uniqueName
           
 
Constructor Summary
ClassTool.CallableSub()
           
 
Method Summary
 java.lang.String getJavadocRef()
           
 int getParameterCount()
          Returns the number of expected parameters.
abstract  java.lang.Class[] getParameters()
           
 java.lang.String getSignature()
           
 java.lang.String getUniqueName()
          Build a unique method/ctor name by appending the simple names of the expected parameter types, thereby distinguishing constructors and overloaded methods with a useful name that would still be a valid method name.
abstract  boolean isVarArgs()
           
protected  java.lang.String signature(boolean fullNames)
           
 boolean takesParameters()
           
 
Methods inherited from class org.apache.velocity.tools.generic.ClassTool.Sub
compareTo, equals, getAnnotations, getElement, getModifiers, getName, getSubType, hashCode, isAbstract, isDeprecated, isFinal, isInterface, isNative, isPrivate, isProtected, isPublic, isStatic, isStrict, isSynchronized, isTransient, isVolatile, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

uniqueName

protected java.lang.String uniqueName

javadocRef

protected java.lang.String javadocRef

signature

protected java.lang.String signature
Constructor Detail

ClassTool.CallableSub

public ClassTool.CallableSub()
Method Detail

getParameters

public abstract java.lang.Class[] getParameters()

isVarArgs

public abstract boolean isVarArgs()

takesParameters

public boolean takesParameters()

getParameterCount

public int getParameterCount()
Returns the number of expected parameters. If this method or constructor is declared with varargs, the vararg only counts as one.


getUniqueName

public java.lang.String getUniqueName()
Build a unique method/ctor name by appending the simple names of the expected parameter types, thereby distinguishing constructors and overloaded methods with a useful name that would still be a valid method name. This is particularly useful for generating JUnit test method names.

Specified by:
getUniqueName in class ClassTool.Sub<T extends ClassTool.CallableSub>

getSignature

public java.lang.String getSignature()

getJavadocRef

public java.lang.String getJavadocRef()
Specified by:
getJavadocRef in class ClassTool.Sub<T extends ClassTool.CallableSub>

signature

protected java.lang.String signature(boolean fullNames)


Copyright (c) 2003-2007 Apache Software Foundation