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
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<JavaTypeVariable<JavaConstructor>>typeParameters
-
Constructor Summary
Constructors Constructor Description DefaultJavaConstructor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetCodeBlock()java.util.List<JavaTypeVariable<JavaConstructor>>getTypeParameters()Equivalent ofGenericDeclaration.getTypeParameters()inthashCode()voidsetTypeParameters(java.util.List<JavaTypeVariable<JavaConstructor>> typeParameters)booleansignatureMatches(java.util.List<JavaType> parameterTypes)Returnstrueif this constructor matches the parameterTypes, assuming it's a non-varArg constructor.booleansignatureMatches(java.util.List<JavaType> parameterTypes, boolean varArgs)Returnstrueif this constructor matches the parameterTypes and matches the varArg argument.java.lang.StringtoString()-
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
-
-
-
-
Field Detail
-
typeParameters
private java.util.List<JavaTypeVariable<JavaConstructor>> typeParameters
-
-
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:
getTypeParametersin interfaceJavaGenericDeclaration- Returns:
- a list of typeParameters, never
null
-
signatureMatches
public boolean signatureMatches(java.util.List<JavaType> parameterTypes)
Returnstrueif this constructor matches the parameterTypes, assuming it's a non-varArg constructor.- Specified by:
signatureMatchesin interfaceJavaConstructor- Parameters:
parameterTypes- the parameter types- Returns:
trueif signature matches, otherwisefalse
-
signatureMatches
public boolean signatureMatches(java.util.List<JavaType> parameterTypes, boolean varArgs)
Returnstrueif this constructor matches the parameterTypes and matches the varArg argument.- Specified by:
signatureMatchesin interfaceJavaConstructor- Overrides:
signatureMatchesin classDefaultJavaExecutable- Parameters:
parameterTypes- the parameter typesvarArgs-trueif the last argument should be a varArg, otherwisefalse- Returns:
trueif signature matches, otherwisefalse
-
getCodeBlock
public java.lang.String getCodeBlock()
- Specified by:
getCodeBlockin interfaceJavaModel- Returns:
- the codeblock
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-