Package com.thoughtworks.qdox.model.impl
Class DefaultJavaConstructor
- 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
-
- com.thoughtworks.qdox.model.impl.DefaultJavaConstructor
-
- All Implemented Interfaces:
JavaAnnotatedElement
,JavaConstructor
,JavaExecutable
,JavaGenericDeclaration
,JavaMember
,JavaModel
,java.io.Serializable
public class DefaultJavaConstructor extends DefaultJavaExecutable implements JavaConstructor
- Since:
- 2.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DefaultJavaConstructor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.lang.String
getCodeBlock()
java.util.List<JavaTypeVariable<JavaConstructor>>
getTypeParameters()
Equivalent ofGenericDeclaration.getTypeParameters()
int
hashCode()
void
setTypeParameters(java.util.List<JavaTypeVariable<JavaConstructor>> typeParameters)
boolean
signatureMatches(java.util.List<JavaType> parameterTypes)
Returnstrue
if this constructor matches the parameterTypes, assuming it's a non-varArg constructor.boolean
signatureMatches(java.util.List<JavaType> parameterTypes, boolean varArgs)
Returnstrue
if this constructor matches the parameterTypes and matches the varArg argument.java.lang.String
toString()
-
Methods inherited from class com.thoughtworks.qdox.model.impl.DefaultJavaExecutable
getCallSignature, getExceptions, getExceptionTypes, getParameterByName, getParameters, getParameterTypes, getParameterTypes, getReturns, getSignature, getSourceCode, getTagsByName, isPublic, isVarArgs, setExceptions, setParameters, setSourceCode
-
Methods inherited from class com.thoughtworks.qdox.model.impl.AbstractInheritableJavaEntity
getTagByName
-
Methods inherited from class com.thoughtworks.qdox.model.impl.AbstractJavaEntity
getDeclaringClass, getModifiers, getName, isAbstract, isFinal, isNative, isPrivate, isProtected, isStatic, isStrictfp, isSynchronized, isTransient, isVolatile, setDeclaringClass, setModifiers, setName
-
Methods inherited from class com.thoughtworks.qdox.model.impl.AbstractBaseJavaEntity
getAnnotations, getComment, getNamedParameter, getSource, getTagByName, getTags, getTagsByName, setAnnotations, setComment, setSource, setTags
-
Methods inherited from class com.thoughtworks.qdox.model.impl.AbstractJavaModel
getLineNumber, getModelWriter, setLineNumber, setModelWriterFactory
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.thoughtworks.qdox.model.JavaAnnotatedElement
getAnnotations, getComment, getNamedParameter, getTagByName, getTags, getTagsByName
-
Methods inherited from interface com.thoughtworks.qdox.model.JavaExecutable
getCallSignature, getDeclaringClass, getExceptions, getExceptionTypes, getParameterByName, getParameters, getParameterTypes, getParameterTypes, getSourceCode, isVarArgs
-
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
getLineNumber
-
-
-
-
Method Detail
-
setTypeParameters
public void setTypeParameters(java.util.List<JavaTypeVariable<JavaConstructor>> typeParameters)
-
getTypeParameters
public java.util.List<JavaTypeVariable<JavaConstructor>> getTypeParameters()
Equivalent ofGenericDeclaration.getTypeParameters()
- Specified by:
getTypeParameters
in interfaceJavaGenericDeclaration
- Returns:
- a list of typeParameters, never
null
-
signatureMatches
public boolean signatureMatches(java.util.List<JavaType> parameterTypes)
Returnstrue
if this constructor matches the parameterTypes, assuming it's a non-varArg constructor.- Specified by:
signatureMatches
in interfaceJavaConstructor
- Parameters:
parameterTypes
- the parameter types- Returns:
true
if signature matches, otherwisefalse
-
signatureMatches
public boolean signatureMatches(java.util.List<JavaType> parameterTypes, boolean varArgs)
Returnstrue
if this constructor matches the parameterTypes and matches the varArg argument.- Specified by:
signatureMatches
in interfaceJavaConstructor
- Overrides:
signatureMatches
in classDefaultJavaExecutable
- Parameters:
parameterTypes
- the parameter typesvarArgs
-true
if the last argument should be a varArg, otherwisefalse
- Returns:
true
if signature matches, otherwisefalse
-
getCodeBlock
public java.lang.String getCodeBlock()
- Specified by:
getCodeBlock
in interfaceJavaModel
- Returns:
- the codeblock
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-