Package com.thoughtworks.qdox.model
Interface JavaExecutable
- All Superinterfaces:
JavaAnnotatedElement
,JavaGenericDeclaration
,JavaMember
,JavaModel
,Serializable
- All Known Subinterfaces:
JavaConstructor
,JavaMethod
- All Known Implementing Classes:
DefaultJavaConstructor
,DefaultJavaExecutable
,DefaultJavaMethod
,JavaMethodDelegate
A shared interface for the common functionality of Method and Constructor.
- Since:
- 2.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionEquivalent ofMember.getDeclaringClass()
Equivalent ofExecutable.getExceptionTypes()
getParameterByName
(String name) Equivalent ofExecutable.getParameterTypes()
, where a JavaParameter also contains the original name if available.Equivalent ofExecutable.getParameterTypes()
getParameterTypes
(boolean resolve) If a class inherits this method from a generic class or interface, you can use this method to get the resolved parameter typesGet the original source code of the body of this method.boolean
Equivalent ofExecutable.isVarArgs()
Methods inherited from interface com.thoughtworks.qdox.model.JavaAnnotatedElement
getAnnotations, getComment, getNamedParameter, getTagByName, getTags, getTagsByName
Methods inherited from interface com.thoughtworks.qdox.model.JavaGenericDeclaration
getTypeParameters
Methods inherited from interface com.thoughtworks.qdox.model.JavaMember
getModifiers, getName, isAbstract, isFinal, isNative, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized, isTransient, isVolatile
Methods inherited from interface com.thoughtworks.qdox.model.JavaModel
getCodeBlock, getLineNumber
-
Method Details
-
getDeclaringClass
JavaClass getDeclaringClass()Description copied from interface:JavaMember
Equivalent ofMember.getDeclaringClass()
- Specified by:
getDeclaringClass
in interfaceJavaMember
- Returns:
- the declaring class
-
getExceptions
Equivalent ofExecutable.getExceptionTypes()
- Returns:
- a list of Exceptions, never
null
-
getExceptionTypes
-
getParameterByName
- Parameters:
name
- the name of the parameter- Returns:
- the
JavaParameter
matching the name, otherwisenull
-
getParameters
List<JavaParameter> getParameters()Equivalent ofExecutable.getParameterTypes()
, where a JavaParameter also contains the original name if available.- Returns:
- a list of JavaParameters, never
null
-
getParameterTypes
Equivalent ofExecutable.getParameterTypes()
- Returns:
- a list of JavaParameters, never
null
- Since:
- 1.12
-
getParameterTypes
If a class inherits this method from a generic class or interface, you can use this method to get the resolved parameter types- Parameters:
resolve
-true
if the resolved types should be returned, otherwisefalse
- Returns:
- the parameter types
- Since:
- 1.12
-
getSourceCode
String getSourceCode()Get the original source code of the body of this method.- Returns:
- Code as string.
-
isVarArgs
boolean isVarArgs()Equivalent ofExecutable.isVarArgs()
- Returns:
true
if the final parameter is a varArg, otherwisefalse
-
getCallSignature
String getCallSignature()
-