Use nestedName for getting the name of an API
This changes the Java `CallableMethod.getApiName()` to use `nestedName` instead of `getSourceDeclaration`. `getSourceDeclaration` would return a `RefType`, on which the `toString()` method returns its `getName`(). However, for nested types this wouldn't work and wouldn't include the enclosing type. This fixes it by using `nestedName` which matches the method that is also used for determining whether a type matches an extensible predicate.
This commit is contained in:
@@ -81,7 +81,7 @@ class CallableMethod extends Method {
|
||||
*/
|
||||
string getApiName() {
|
||||
result =
|
||||
this.getDeclaringType().getPackage() + "." + this.getDeclaringType().getSourceDeclaration() +
|
||||
this.getDeclaringType().getPackage() + "." + this.getDeclaringType().nestedName() +
|
||||
"#" + this.getName() + paramsString(this)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user