mirror of
https://github.com/github/codeql.git
synced 2026-04-29 10:45:15 +02:00
Java: add isParameterless predicate to Constructor class
This commit is contained in:
@@ -628,6 +628,9 @@ class Constructor extends Callable, @constructor {
|
||||
/** Holds if this is a default constructor, not explicitly declared in source code. */
|
||||
predicate isDefaultConstructor() { isDefConstr(this) }
|
||||
|
||||
/** Holds if this is a constructor without parameters. */
|
||||
predicate isParameterless() { this.getNumberOfParameters() = 0 }
|
||||
|
||||
override Constructor getSourceDeclaration() { constrs(this, _, _, _, _, result) }
|
||||
|
||||
override string getSignature() { constrs(this, _, result, _, _, _) }
|
||||
|
||||
Reference in New Issue
Block a user