mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
Merge pull request #5805 from smowton/smowton/admin/spring-setter-method-docs
Document `SpringProperty::getSetterMethod`.
This commit is contained in:
@@ -69,11 +69,19 @@ class SpringProperty extends SpringXMLElement {
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a setter method declared on this property's enclosing bean that sets this property.
|
||||
*/
|
||||
Method getSetterMethod() {
|
||||
this.getEnclosingBean().getClass().hasMethod(result, _) and
|
||||
result.getName().toLowerCase() = "set" + this.getPropertyName().toLowerCase()
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a setter method declared on bean `context` that sets this property.
|
||||
*
|
||||
* This property must be declared on a bean that is an ancestor of `context`.
|
||||
*/
|
||||
Method getSetterMethod(SpringBean context) {
|
||||
this.getEnclosingBean() = context.getBeanParent*() and
|
||||
context.getClass().hasMethod(result, _) and
|
||||
|
||||
Reference in New Issue
Block a user