import default import semmle.code.java.frameworks.spring.SpringXMLElement import semmle.code.java.frameworks.spring.SpringBean /** Represents a <repalced-method> element in a Spring XML file*/ class SpringReplacedMethod extends SpringXMLElement { SpringReplacedMethod() { this.getName() = "replaced-method" } /** returns the value of the name attribute*/ string getMethodName() { result = this.getAttributeValue("name") } /** returns the value of the replacer attribute*/ string getReplacerBeanName() { result = this.getAttributeValue("replacer") } /** returns the bean referred to by the replacer attribute*/ SpringBean getReplacerBean() { result.getBeanIdentifier() = this.getReplacerBeanName() } }