Skip to content

Commit a053792

Browse files
committed
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.
1 parent bd0e560 commit a053792

File tree

1 file changed

+1
-1
lines changed
  • extensions/ql-vscode/src/data-extensions-editor/queries

1 file changed

+1
-1
lines changed

extensions/ql-vscode/src/data-extensions-editor/queries/java.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class CallableMethod extends Method {
8181
*/
8282
string getApiName() {
8383
result =
84-
this.getDeclaringType().getPackage() + "." + this.getDeclaringType().getSourceDeclaration() +
84+
this.getDeclaringType().getPackage() + "." + this.getDeclaringType().nestedName() +
8585
"#" + this.getName() + paramsString(this)
8686
}
8787

0 commit comments

Comments
 (0)