Class ClassTool.MethodSub
java.lang.Object
org.apache.velocity.tools.generic.ClassTool.Sub<ClassTool.MethodSub>
org.apache.velocity.tools.generic.ClassTool.CallableSub<ClassTool.MethodSub>
org.apache.velocity.tools.generic.ClassTool.MethodSub
- All Implemented Interfaces:
Comparable<ClassTool.MethodSub>
- Enclosing class:
ClassTool
A simplified wrapping interface for inspecting features
of a
Method in an inspected Class.- Since:
- VelocityTools 2.0
- Version:
- $Id: ClassTool.java 463298 2006-10-12 16:10:32Z henning $
- Author:
- Nathan Bubna
-
Field Summary
FieldsFields inherited from class ClassTool.CallableSub
javadocRef, signature, uniqueName -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected AnnotatedElementprotected intgetName()Class[]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.protected StringbooleanReturns true if the final parameter for the method was declared as a vararg.booleanisVoid()Returns true if the return type of this method is void.Methods inherited from class ClassTool.CallableSub
getJavadocRef, getParameterCount, getSignature, getUniqueName, signature, takesParametersMethods inherited from class ClassTool.Sub
compareTo, equals, getAnnotations, hashCode, isAbstract, isDeprecated, isFinal, isInterface, isNative, isPrivate, isProtected, isPublic, isStatic, isStrict, isSynchronized, isTransient, isVolatile, toString
-
Field Details
-
method
-
-
Constructor Details
-
MethodSub
-
-
Method Details
-
getElement
- Specified by:
getElementin classClassTool.Sub<ClassTool.MethodSub>- Returns:
- inspected element
-
getName
- Specified by:
getNamein classClassTool.Sub<ClassTool.MethodSub>- Returns:
- method name
-
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")- Returns:
- related property name, or null
-
isVarArgs
public boolean isVarArgs()Returns true if the final parameter for the method was declared as a vararg.- Specified by:
isVarArgsin classClassTool.CallableSub<ClassTool.MethodSub>- Returns:
- vararg status
-
isVoid
public boolean isVoid()Returns true if the return type of this method is void.- Returns:
trueif the inspected method returns null
-
getReturns
- Returns:
- inspected method return type
-
getParameters
- Specified by:
getParametersin classClassTool.CallableSub<ClassTool.MethodSub>- Returns:
- inspected method parameters types
-
getModifiers
protected int getModifiers()- Specified by:
getModifiersin classClassTool.Sub<ClassTool.MethodSub>- Returns:
- inspected method modifiers
-
getSubType
- Specified by:
getSubTypein classClassTool.Sub<ClassTool.MethodSub>- Returns:
- inspector type, aka "method"
-