Class AccessTarget.MethodCallTarget

    • Method Detail

      • resolve

        public java.util.Set<JavaMethod> resolve()
        Attempts to resolve imported methods that match this target. Note that while usually there is one unique target (if imported), it is possible that the call is ambiguous. For example consider
         interface A {
             void target();
         interface B {
             void target();
         interface C extends A, B {}
         class X {
             C c;
             // ...
             void origin() {
        While, for any concrete implementation, the compiler will naturally resolve one concrete target to link to, and thus at runtime the called target ist clear, from an analytical point of view the relevant target can't be uniquely identified here. To sum up, the result can be
        • empty - if no imported method matches the target
        • a single method - if the method was imported and can uniquely be identified
        • several methods - in scenarios where there is no unique method that matches the target
        Note that the target would be uniquely determinable, if C would declare void target() itself.
        Specified by:
        resolve in class AccessTarget.CodeUnitCallTarget
        Set of matching methods, usually a single target
        See Also:
        AccessTarget.ConstructorCallTarget.resolveConstructor(), resolve()