org.apache.velocity.tools.generic
Class ClassTool.MethodSub

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

public static class ClassTool.MethodSub
extends ClassTool.CallableSub<ClassTool.MethodSub>

A simplified wrapping interface for inspecting features of a Method in an inspected Class.


Field Summary
protected  Method method
           
 
Fields inherited from class org.apache.velocity.tools.generic.ClassTool.CallableSub
javadocRef, signature, uniqueName
 
Constructor Summary
ClassTool.MethodSub(Method method)
           
 
Method Summary
protected  AnnotatedElement getElement()
           
protected  int getModifiers()
           
 String getName()
           
 Class[] getParameters()
           
 String getPropertyName()
          If this method can be treated as a bean property in Velocity (which does not exactly follow the javabean spec for such things) then it will return the "bean property" equivalent of the method name.
 Class getReturns()
           
protected  String getSubType()
           
 boolean isVarArgs()
          Returns true if the final parameter for the method was declared as a vararg.
 boolean isVoid()
          Returns true if the return type of this method is void.
 
Methods inherited from class org.apache.velocity.tools.generic.ClassTool.CallableSub
getJavadocRef, getParameterCount, getSignature, getUniqueName, signature, takesParameters
 
Methods inherited from class org.apache.velocity.tools.generic.ClassTool.Sub
compareTo, equals, getAnnotations, 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

method

protected Method method
Constructor Detail

ClassTool.MethodSub

public ClassTool.MethodSub(Method method)
Method Detail

getElement

protected AnnotatedElement getElement()
Specified by:
getElement in class ClassTool.Sub<ClassTool.MethodSub>

getName

public String getName()
Specified by:
getName in class ClassTool.Sub<ClassTool.MethodSub>

getPropertyName

public String getPropertyName()
If this method can be treated as a bean property in Velocity (which does not exactly follow the javabean spec for such things) then it will return the "bean property" equivalent of the method name. (e.g. for getFoo(), isFoo() or setFoo(foo) it will return "foo")


isVarArgs

public boolean isVarArgs()
Returns true if the final parameter for the method was declared as a vararg.

Specified by:
isVarArgs in class ClassTool.CallableSub<ClassTool.MethodSub>

isVoid

public boolean isVoid()
Returns true if the return type of this method is void.


getReturns

public Class getReturns()

getParameters

public Class[] getParameters()
Specified by:
getParameters in class ClassTool.CallableSub<ClassTool.MethodSub>

getModifiers

protected int getModifiers()
Specified by:
getModifiers in class ClassTool.Sub<ClassTool.MethodSub>

getSubType

protected String getSubType()
Specified by:
getSubType in class ClassTool.Sub<ClassTool.MethodSub>


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