code: protected static Invocable resolveJavaMethod(
              Class<?> clas, String name, Class<?>[] types,
              boolean staticOnly ) throws UtilEvalError {
          if ( clas == null )
              throw new InterpreterError("null class");
  
          Invocable method = BshClassManager.memberCache
                  .get(clas).findMethod(name, types);
          checkFoundStaticMethod( method, staticOnly, clas );
          return method;
      }
docs: The full blown resolver method.  All other method invocation methods
  delegate to this.  The method may be static or dynamic unless
  staticOnly is set (in which case object may be null).
  If staticOnly is set then only static methods will be located.
  <p/>
  
  This method performs caching (caches discovered methods through the
  class manager and utilizes cached methods.)
  <p/>
  
  This method determines whether to attempt to use non-public methods
  based on Capabilities.haveAccessibility() and will set the accessibilty
  flag on the method as necessary.
  <p/>
  
  If, when directed to find a static method, this method locates a more
  specific matching instance method it will throw a descriptive exception
  analogous to the error that the Java compiler would produce.
  Note: as of 2.0.x this is a problem because there is no way to work
  around this with a cast.
  <p/>
  
  @param staticOnly
  The method located must be static, the object param may be null.
  @return the method or null if no matching method was found.