Package com.thoughtworks.qdox.model
Interface JavaExecutable
-
- All Superinterfaces:
JavaAnnotatedElement,JavaGenericDeclaration,JavaMember,JavaModel,java.io.Serializable
- All Known Subinterfaces:
JavaConstructor,JavaMethod
- All Known Implementing Classes:
DefaultJavaConstructor,DefaultJavaExecutable,DefaultJavaMethod,JavaMethodDelegate
public interface JavaExecutable extends JavaAnnotatedElement, JavaGenericDeclaration, JavaMember
A shared interface for the common functionality of Method and Constructor.- Since:
- 2.0
- See Also:
Executable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetCallSignature()JavaClassgetDeclaringClass()Equivalent ofMember.getDeclaringClass()java.util.List<JavaClass>getExceptions()Equivalent ofExecutable.getExceptionTypes()java.util.List<JavaType>getExceptionTypes()JavaParametergetParameterByName(java.lang.String name)java.util.List<JavaParameter>getParameters()Equivalent ofExecutable.getParameterTypes(), where a JavaParameter also contains the original name if available.java.util.List<JavaType>getParameterTypes()Equivalent ofExecutable.getParameterTypes()java.util.List<JavaType>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 typesjava.lang.StringgetSourceCode()Get the original source code of the body of this method.booleanisVarArgs()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 Detail
-
getDeclaringClass
JavaClass getDeclaringClass()
Description copied from interface:JavaMemberEquivalent ofMember.getDeclaringClass()- Specified by:
getDeclaringClassin interfaceJavaMember- Returns:
- the declaring class
-
getExceptions
java.util.List<JavaClass> getExceptions()
Equivalent ofExecutable.getExceptionTypes()- Returns:
- a list of Exceptions, never
null
-
getExceptionTypes
java.util.List<JavaType> getExceptionTypes()
-
getParameterByName
JavaParameter getParameterByName(java.lang.String name)
- Parameters:
name- the name of the parameter- Returns:
- the
JavaParametermatching the name, otherwisenull
-
getParameters
java.util.List<JavaParameter> getParameters()
Equivalent ofExecutable.getParameterTypes(), where a JavaParameter also contains the original name if available.- Returns:
- a list of JavaParameters, never
null
-
getParameterTypes
java.util.List<JavaType> getParameterTypes()
Equivalent ofExecutable.getParameterTypes()- Returns:
- a list of JavaParameters, never
null - Since:
- 1.12
-
getParameterTypes
java.util.List<JavaType> 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 types- Parameters:
resolve-trueif the resolved types should be returned, otherwisefalse- Returns:
- the parameter types
- Since:
- 1.12
-
getSourceCode
java.lang.String getSourceCode()
Get the original source code of the body of this method.- Returns:
- Code as string.
-
isVarArgs
boolean isVarArgs()
Equivalent ofExecutable.isVarArgs()- Returns:
trueif the final parameter is a varArg, otherwisefalse
-
getCallSignature
java.lang.String getCallSignature()
-
-