Changeset 13282
- Timestamp:
- 05/21/11 12:40:49 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/Java.java
r13259 r13282 772 772 773 773 private static final Primitive JRESOLVE_METHOD = new pf_jresolve_method(); 774 @DocString(name="jresolve _method", args="method-name instance &rest args",774 @DocString(name="jresolve-method", args="method-name instance &rest args", 775 775 doc="Finds the most specific Java method METHOD-NAME on INSTANCE " + 776 776 "applicable to arguments ARGS. Returns NIL if no suitable method is " + … … 778 778 "when it is called with a string as the first parameter (METHOD-REF).") 779 779 private static final class pf_jresolve_method extends Primitive { 780 781 780 pf_jresolve_method() { 782 781 super(Symbol.JRESOLVE_METHOD); … … 807 806 Object[] methodArgs = translateMethodArguments(args, 2); 808 807 Method method = findMethod(instance, intendedClass, methodName, methodArgs); 808 if (method != null) { 809 return JavaObject.getInstance(method); 810 } else if (instanceArg instanceof JavaObject) { 811 // Sometimes JavaObject.intendedClass has the default 812 // value java.lang.Object, so we try again to resolve 813 // the method using a dynamically requested value for 814 // java.lang.Class. 815 intendedClass = ((JavaObject)instanceArg).getObject().getClass(); 816 method = findMethod(instance, intendedClass, methodName, methodArgs); 817 } else { 818 return NIL; 819 } 809 820 if (method != null) { 810 821 return JavaObject.getInstance(method);
Note: See TracChangeset
for help on using the changeset viewer.