public interface JavaConstructor extends JavaModel, JavaAnnotatedElement, JavaGenericDeclaration, JavaMember, ParameterDeclarator, Serializable
Constructor
, providing the most important methods.
Where the original Constructor is using an Array, this model is using a List
.Modifier and Type | Method and Description |
---|---|
String |
getCodeBlock()
Retrieve the complete codeblock of the constructor, including the sourcecode.
|
List<JavaClass> |
getExceptions()
Equivalent of
Constructor.getExceptionTypes() |
List<JavaType> |
getExceptionTypes() |
JavaParameter |
getParameterByName(String name) |
List<JavaParameter> |
getParameters()
Equivalent of
Constructor.getParameterTypes() , where a JavaParameter also contains the original name if available. |
List<JavaType> |
getParameterTypes()
Equivalent of
Constructor.getParameterTypes() |
String |
getSourceCode()
Retrieve the code between the brackets
|
boolean |
isVarArgs()
Equivalent of
Constructor.isVarArgs() |
boolean |
signatureMatches(List<JavaType> parameterTypes)
Returns
true if this constructor matches the parameterTypes, assuming it's a non-varArg constructor. |
boolean |
signatureMatches(List<JavaType> parameterTypes,
boolean varArgs)
Returns
true if this constructor matches the parameterTypes and matches the varArg argument. |
getLineNumber, getSource
getAnnotations, getComment, getNamedParameter, getTagByName, getTags, getTagsByName
getDeclaringClass, getModifiers, getName, isAbstract, isFinal, isNative, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized, isTransient, isVolatile
getParentClass
getTypeParameters
List<JavaParameter> getParameters()
Constructor.getParameterTypes()
, where a JavaParameter also contains the original name if available.null
JavaParameter getParameterByName(String name)
name
- the name of the parameterJavaParameter
matching the name, otherwise null
List<JavaType> getParameterTypes()
Constructor.getParameterTypes()
null
List<JavaClass> getExceptions()
Constructor.getExceptionTypes()
null
boolean isVarArgs()
Constructor.isVarArgs()
true
if the final parameter is a varArg, otherwise false
String getSourceCode()
String getCodeBlock()
getCodeBlock
in interface JavaModel
boolean signatureMatches(List<JavaType> parameterTypes)
true
if this constructor matches the parameterTypes, assuming it's a non-varArg constructor.parameterTypes
- true
if signature matches, otherwise false
Copyright © 2002–2015. All rights reserved.