mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-09-07 08:26:11 +00:00
Add eagerly-populated methodByOwner index to SymbolTable, keyed by ownerNodeId\0methodName. Used by walkMixedChain as a fast path for resolving intermediate method calls in cross-class chains like user.getAddress().getCity().getZipCode(), avoiding expensive fuzzy lookups when the owner type is already known. Handles overloaded methods: returns the first match when all overloads share the same returnType, undefined when return types differ (ambiguous). - Add lookupMethodByOwner to SymbolTable interface + implementation - Add resolveMethodByOwner helper in call-processor.ts - Add fast path in walkMixedChain before resolveCallTarget fallback - Add Java cross-class chain fixture + 6 integration tests - Add 148 unit tests for methodByOwner index behavior
16 lines
542 B
Java
16 lines
542 B
Java
public class App {
|
|
// Two-step pure method chain: user.getAddress().save()
|
|
public static void twoStepChain(User user) {
|
|
user.getAddress().save();
|
|
}
|
|
|
|
// Three-step pure method chain: user.getAddress().getCity().getZipCode()
|
|
public static void threeStepChain(User user) {
|
|
user.getAddress().getCity().getZipCode();
|
|
}
|
|
|
|
// Mixed chain: method then field then method: user.getAddress().city.getZipCode()
|
|
public static void mixedChain(User user) {
|
|
user.getAddress().city.getZipCode();
|
|
}
|
|
}
|