Interface JavaConstructor

All Superinterfaces:
JavaAnnotatedElement, JavaExecutable, JavaGenericDeclaration, JavaMember, JavaModel, Serializable
All Known Implementing Classes:
DefaultJavaConstructor

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
  • Method Details

    • signatureMatches

      boolean signatureMatches(List<JavaType> parameterTypes)
      Returns true if this constructor matches the parameterTypes, assuming it's a non-varArg constructor.
      Parameters:
      parameterTypes - the parameter types
      Returns:
      true if signature matches, otherwise false
    • signatureMatches

      boolean signatureMatches(List<JavaType> parameterTypes, boolean varArgs)
      Returns true if this constructor matches the parameterTypes and matches the varArg argument.
      Parameters:
      parameterTypes - the parameter types
      varArgs - true if the last argument should be a varArg, otherwise false
      Returns:
      true if signature matches, otherwise false