Package com.thoughtworks.qdox.model.impl
Class DefaultJavaExecutable
java.lang.Object
com.thoughtworks.qdox.model.impl.AbstractJavaModel
com.thoughtworks.qdox.model.impl.AbstractBaseJavaEntity
com.thoughtworks.qdox.model.impl.AbstractJavaEntity
com.thoughtworks.qdox.model.impl.AbstractInheritableJavaEntity
com.thoughtworks.qdox.model.impl.DefaultJavaExecutable
- All Implemented Interfaces:
JavaAnnotatedElement,JavaExecutable,JavaGenericDeclaration,JavaMember,JavaModel,Serializable
- Direct Known Subclasses:
DefaultJavaConstructor,DefaultJavaMethod
public abstract class DefaultJavaExecutable
extends AbstractInheritableJavaEntity
implements JavaExecutable
The BaseMethod contains all methods used by both JavaMethod and JavaConstructor
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionEquivalent 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 typesprotected JavaTypeprotected StringgetSignature(boolean withModifiers, boolean isDeclaration) Get the original source code of the body of this method.getTagsByName(String name, boolean inherited) booleanisPublic()Equivalent ofModifier.isPublic(int)booleanEquivalent ofExecutable.isVarArgs()voidsetExceptions(List<JavaClass> exceptions) voidsetParameters(List<JavaParameter> javaParameters) voidsetSourceCode(String sourceCode) protected booleansignatureMatches(List<JavaType> parameterTypes, boolean varArgs) Methods inherited from class com.thoughtworks.qdox.model.impl.AbstractInheritableJavaEntity
getTagByNameMethods inherited from class com.thoughtworks.qdox.model.impl.AbstractJavaEntity
getDeclaringClass, getModifiers, getName, isAbstract, isFinal, isNative, isPrivate, isProtected, isStatic, isStrictfp, isSynchronized, isTransient, isVolatile, setDeclaringClass, setModifiers, setNameMethods inherited from class com.thoughtworks.qdox.model.impl.AbstractBaseJavaEntity
getAnnotations, getComment, getNamedParameter, getSource, getTagByName, getTags, getTagsByName, setAnnotations, setComment, setSource, setTagsMethods inherited from class com.thoughtworks.qdox.model.impl.AbstractJavaModel
getLineNumber, getModelWriter, setLineNumber, setModelWriterFactoryMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.thoughtworks.qdox.model.JavaAnnotatedElement
getAnnotations, getComment, getNamedParameter, getTagByName, getTags, getTagsByNameMethods inherited from interface com.thoughtworks.qdox.model.JavaExecutable
getDeclaringClassMethods inherited from interface com.thoughtworks.qdox.model.JavaGenericDeclaration
getTypeParametersMethods inherited from interface com.thoughtworks.qdox.model.JavaMember
getModifiers, getName, isAbstract, isFinal, isNative, isPrivate, isProtected, isStatic, isStrictfp, isSynchronized, isTransient, isVolatileMethods inherited from interface com.thoughtworks.qdox.model.JavaModel
getCodeBlock, getLineNumber
-
Field Details
-
parameters
-
exceptions
-
varArgs
private boolean varArgs -
sourceCode
-
-
Constructor Details
-
DefaultJavaExecutable
public DefaultJavaExecutable()
-
-
Method Details
-
getParameters
Equivalent ofExecutable.getParameterTypes(), where a JavaParameter also contains the original name if available.- Specified by:
getParametersin interfaceJavaExecutable- Returns:
- a list of JavaParameters, never
null
-
getParameterByName
- Specified by:
getParameterByNamein interfaceJavaExecutable- Parameters:
name- the name of the parameter- Returns:
- the
JavaParametermatching the name, otherwisenull
-
getExceptions
Equivalent ofExecutable.getExceptionTypes()- Specified by:
getExceptionsin interfaceJavaExecutable- Returns:
- a list of Exceptions, never
null
-
getExceptionTypes
- Specified by:
getExceptionTypesin interfaceJavaExecutable
-
isVarArgs
public boolean isVarArgs()Equivalent ofExecutable.isVarArgs()- Specified by:
isVarArgsin interfaceJavaExecutable- Returns:
trueif the final parameter is a varArg, otherwisefalse
-
setParameters
-
setExceptions
-
signatureMatches
-
isPublic
public boolean isPublic()Equivalent ofModifier.isPublic(int)- Specified by:
isPublicin interfaceJavaMember- Overrides:
isPublicin classAbstractJavaEntity- Returns:
trueif entity is public, otherwisefalse
-
getTagsByName
- Specified by:
getTagsByNamein classAbstractInheritableJavaEntity
-
getParameterTypes
Equivalent ofExecutable.getParameterTypes()- Specified by:
getParameterTypesin interfaceJavaExecutable- Returns:
- a list of JavaParameters, never
null
-
getParameterTypes
If a class inherits this method from a generic class or interface, you can use this method to get the resolved parameter types- Specified by:
getParameterTypesin interfaceJavaExecutable- Parameters:
resolve-trueif the resolved types should be returned, otherwisefalse- Returns:
- the parameter types
-
getSourceCode
Get the original source code of the body of this method.- Specified by:
getSourceCodein interfaceJavaExecutable- Returns:
- Code as string.
-
setSourceCode
-
getCallSignature
- Specified by:
getCallSignaturein interfaceJavaExecutable
-
getReturns
-
getSignature
- Since:
- 1.3
-