Interface JavaConstructor
- All Superinterfaces:
JavaAnnotatedElement, JavaExecutable, JavaGenericDeclaration, JavaMember, JavaModel, Serializable
- All Known Implementing Classes:
DefaultJavaConstructor
public interface JavaConstructor
extends JavaModel, JavaAnnotatedElement, JavaGenericDeclaration, JavaMember, JavaExecutable, Serializable
Modeled equivalent of
Constructor, providing the most important methods.
Where the original Constructor is using an Array, this model is using a List.- Since:
- 2.0
- Author:
- Robert Scholte
-
Method Summary
Modifier and TypeMethodDescriptionbooleansignatureMatches(List<JavaType> parameterTypes) Returnstrueif this constructor matches the parameterTypes, assuming it's a non-varArg constructor.booleansignatureMatches(List<JavaType> parameterTypes, boolean varArgs) Returnstrueif this constructor matches the parameterTypes and matches the varArg argument.Methods inherited from interface JavaAnnotatedElement
getAnnotations, getComment, getNamedParameter, getTagByName, getTags, getTagsByNameMethods inherited from interface JavaExecutable
getCallSignature, getDeclaringClass, getExceptions, getExceptionTypes, getParameterByName, getParameters, getParameterTypes, getParameterTypes, getSourceCode, isVarArgsMethods inherited from interface JavaGenericDeclaration
getTypeParametersMethods inherited from interface JavaMember
getModifiers, getName, isAbstract, isFinal, isNative, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized, isTransient, isVolatileMethods inherited from interface JavaModel
getCodeBlock, getLineNumber
-
Method Details
-
signatureMatches
-
signatureMatches
Returnstrueif this constructor matches the parameterTypes and matches the varArg argument.- Parameters:
parameterTypes- the parameter typesvarArgs-trueif the last argument should be a varArg, otherwisefalse- Returns:
trueif signature matches, otherwisefalse
-