@Override
 public int compare(Method o1, Method o2) {
   String n1 = o1.getName().toLowerCase(), n2 = o2.getName().toLowerCase();
   if (n1.contains("dispose") || n1.contains("close")) return 1;
   if (n2.contains("dispose") || n2.contains("close")) return -1;
   return n1.compareTo(n2);
 }
    public int compare(Method a, Method b) {
      if (a == b) return 0;
      else if (a == null) return -1;
      else if (b == null) return 1;
      else if (a.equals(b)) return 0;

      int cmp = a.getName().compareTo(b.getName());
      if (cmp != 0) return cmp;

      Class[] paramA = a.getParameterTypes();
      Class[] paramB = b.getParameterTypes();

      if (paramA.length < paramB.length) return -1;
      else if (paramB.length < paramA.length) return 1;

      for (int i = 0; i < paramA.length; i++) {
        cmp = paramA[i].getName().compareTo(paramB[i].getName());
        if (cmp != 0) return cmp;
      }

      cmp = a.getDeclaringClass().getName().compareTo(b.getDeclaringClass().getName());
      if (cmp != 0) return cmp;

      return a.getReturnType().getName().compareTo(b.getReturnType().getName());
    }
Beispiel #3
0
  /**
   * There are some nasty bugs for introspection with generics. This method addresses those nasty
   * bugs and tries to find proper methods if available
   * http://bugs.sun.com/view_bug.do?bug_id=6788525 http://bugs.sun.com/view_bug.do?bug_id=6528714
   *
   * @param descriptor
   * @return
   */
  private static PropertyDescriptor fixGenericDescriptor(
      Class<?> clazz, PropertyDescriptor descriptor) {
    Method readMethod = descriptor.getReadMethod();
    Method writeMethod = descriptor.getWriteMethod();

    if (readMethod != null && (readMethod.isBridge() || readMethod.isSynthetic())) {
      String propertyName = descriptor.getName();
      // capitalize the first letter of the string;
      String baseName = Character.toUpperCase(propertyName.charAt(0)) + propertyName.substring(1);
      String setMethodName = "set" + baseName;
      String getMethodName = "get" + baseName;
      Method[] methods = clazz.getMethods();
      for (Method method : methods) {
        if (method.getName().equals(getMethodName) && !method.isBridge() && !method.isSynthetic()) {
          try {
            descriptor.setReadMethod(method);
          } catch (IntrospectionException e) {
            // move on
          }
        }
        if (method.getName().equals(setMethodName) && !method.isBridge() && !method.isSynthetic()) {
          try {
            descriptor.setWriteMethod(method);
          } catch (IntrospectionException e) {
            // move on
          }
        }
      }
    }
    return descriptor;
  }
    public Object invoke(Object target, Method method, Object[] params) throws Throwable {
      if (EQUALS_METHOD.equals(method)) {
        Object param = params[0];
        if (param == null || !Proxy.isProxyClass(param.getClass())) {
          return false;
        }
        InvocationHandler other = Proxy.getInvocationHandler(param);
        return equals(other);
      } else if (HASHCODE_METHOD.equals(method)) {
        return hashCode();
      }

      MethodInvocation invocation =
          new MethodInvocation(
              method.getName(),
              method.getReturnType(),
              method.getGenericReturnType(),
              method.getParameterTypes(),
              delegate,
              params);
      invoker.invoke(invocation);
      if (!invocation.found()) {
        String methodName =
            method.getDeclaringClass().getSimpleName() + "." + method.getName() + "()";
        throw Exceptions.unsupportedMethod(methodName);
      }
      return invocation.getResult();
    }
  /**
   * Handles a received {@link MBeanServerConnection} invocation
   *
   * @param channel The channel the request was received on
   * @param remoteAddress The remote address of the caller
   * @param buffer THe buffer received
   */
  public static void handleJMXRequest(
      Channel channel, SocketAddress remoteAddress, ChannelBuffer buffer) {
    buffer.resetReaderIndex();
    /* The request write */
    //		cb.writeByte(OpCode.JMX_REQUEST.op());  // 1
    //		cb.writeBytes(domainInfoData);   // domain data
    //		cb.writeInt(reqId);					// 4
    //		cb.writeByte(methodToKey.get(method)); // 1
    //		cb.writeInt(sargs.length);  			// 4
    //		cb.writeBytes(sargs);		           // sargs.length
    Object result = null;
    MBeanServerConnection server = null;
    buffer.skipBytes(1);
    byte domainIndicator = buffer.readByte();
    if (domainIndicator == 0) {
      server = JMXHelper.getHeliosMBeanServer();
    } else {
      byte[] domainBytes = new byte[domainIndicator];
      buffer.readBytes(domainBytes);
      String domain = new String(domainBytes);
      server = JMXHelper.getLocalMBeanServer(true, domain);
      if (server == null) {
        result = new SmallException("Failed to locate MBeanServer for domain [" + domain + "]");
      }
    }
    int reqId = buffer.readInt();
    byte methodId = buffer.readByte();
    if (result == null) {
      int payloadSize = buffer.readInt();
      byte[] payload = new byte[payloadSize];
      buffer.readBytes(payload);
      Object[] params = getInput(payload);
      Method targetMethod = null;
      try {
        targetMethod = keyToMethod.get(methodId);
        if (targetMethod == null) {
          result =
              new SmallException(
                  "Failed to handle MBeanServerConnection invocation because method Op Code ["
                      + methodId
                      + "] was not recognized");
        } else {
          if ("addNotificationListener".equals(targetMethod.getName())
              && !targetMethod.getParameterTypes()[1].equals(ObjectName.class)) {

          } else if ("removeNotificationListener".equals(targetMethod.getName())
              && !targetMethod.getParameterTypes()[1].equals(ObjectName.class)) {

          } else {
            result = targetMethod.invoke(server, params);
          }
        }
      } catch (Throwable t) {
        SimpleLogger.warn("Failed to invoke [", targetMethod, "]", t);
        result = new SmallException(t.toString());
      }
    }
    writeJMXResponse(reqId, methodId, channel, remoteAddress, result);
  }
  private void generateView(
      Map<String, DesignDocument.View> views, Method me, Class<?> handledType) {
    String name = me.getName();
    if (!name.startsWith("findBy") && !name.equals("getAll")) {
      throw new ViewGenerationException(
          String.format(
              "The method: %s in %s annotated with GenerateView does not conform to the naming convention of 'findByXxxx'",
              name, me.getDeclaringClass()));
    }

    Class<?> type = resolveReturnType(me);
    if (type == null) {
      if (handledType != null) {
        type = handledType;
      } else {
        throw new ViewGenerationException(
            "Could not resolve return type for method: %s in %s",
            me.getName(), me.getDeclaringClass());
      }
    }

    String typeDiscriminator = resolveTypeDiscriminator(type);

    if (name.equals("getAll")) {
      if (typeDiscriminator.length() < 1) {
        throw new ViewGenerationException(
            String.format(
                "Cannot generate 'all' view for %s. No type discriminator could be resolved. Try annotate unique field(s) with @TypeDiscriminator",
                type.getDeclaringClass()));
      }
      views.put("all", generateAllView(typeDiscriminator));
      return;
    }

    String finderName = name.substring(6);
    String fieldName = resolveFieldName(me, finderName);
    Method getter = findMethod(type, "get" + fieldName);
    if (getter == null) {
      // try pluralis
      fieldName += "s";
      getter = findMethod(type, "get" + fieldName);
    }
    if (getter == null) {
      throw new ViewGenerationException(
          "Could not generate view for method %s. No get method found for property %s in %s",
          name, name.substring(6), type);
    }

    fieldName = firstCharToLowerCase(fieldName);

    DesignDocument.View view;
    if (isIterable(getter.getReturnType())) {
      view = generateFindByIterableView(fieldName, typeDiscriminator);
    } else {
      view = generateFindByView(fieldName, typeDiscriminator);
    }

    views.put("by_" + firstCharToLowerCase(finderName), view);
  }
 {
   for (Method m : this.getClass().getDeclaredMethods()) {
     if (m.getName().matches("m[0-9]+(_check)?")) {
       assert (Modifier.isStatic(m.getModifiers())) : m;
       tests.put(m.getName(), m);
     }
   }
 }
Beispiel #8
0
 public void process(File cFile) {
   try {
     String cName = ClassNameFinder.thisClass(BinaryFile.read(cFile));
     if (!cName.contains("")) return; // Ignore unpackaged classes
     testClass = Class.forName(cName);
   } catch (Exception e) {
     throw new RuntimeException(e);
   }
   TestMethods testMethods = new TestMethods();
   Method creator = null;
   Method cleanup = null;
   for (Method m : testClass.getDeclaredMethods()) {
     testMethods.addIfTestMethod(m);
     if (creator == null) creator = checkForCreatorMethod(m);
     if (cleanup == null) cleanup = checkForCleanupMethod(m);
   }
   if (testMethods.size() > 0) {
     if (creator == null)
       try {
         if (!Modifier.isPublic(testClass.getDeclaredConstructor().getModifiers())) {
           Print.print("Error: " + testClass + " default constructor must be public");
           System.exit(1);
         }
       } catch (NoSuchMethodException e) {
         // Synthesized default constructor; OK
       }
     Print.print(testClass.getName());
   }
   for (Method m : testMethods) {
     Print.printnb("  . " + m.getName() + " ");
     try {
       Object testObject = createTestObject(creator);
       boolean success = false;
       try {
         if (m.getReturnType().equals(boolean.class)) success = (Boolean) m.invoke(testObject);
         else {
           m.invoke(testObject);
           success = true; // If no assert fails
         }
       } catch (InvocationTargetException e) {
         // Actual exception is inside e:
         Print.print(e.getCause());
       }
       Print.print(success ? "" : "(failed)");
       testsRun++;
       if (!success) {
         failures++;
         failedTests.add(testClass.getName() + ": " + m.getName());
       }
       if (cleanup != null) cleanup.invoke(testObject, testObject);
     } catch (Exception e) {
       throw new RuntimeException(e);
     }
   }
 }
  /**
   * Computes the set of emit methods in the Assembler for a given IA32 opcode.
   *
   * @param emitters the set of all emit methods
   * @param opcode the opcode being examined
   */
  private static EmitterSet buildSetForOpcode(Method[] emitters, String opcode) {
    EmitterSet s = new EmitterSet();
    for (int i = 0; i < emitters.length; i++) {
      Method m = emitters[i];
      if (m.getName().startsWith("emit" + opcode + "_") || m.getName().equals("emit" + opcode)) {
        s.add(new EmitterDescriptor(m.getName(), m.getParameterTypes()));
      }
    }

    return s;
  }
 Method getWriteProperty(Method m, Class c) {
   try {
     if (m.getName().startsWith("get")) {
       return c.getMethod("set" + (m.getName().substring(3)), new Class[] {m.getReturnType()});
     } else if (m.getName().startsWith("is")) {
       return c.getMethod("set" + (m.getName().substring(2)), new Class[] {m.getReturnType()});
     } else return null;
   } catch (Exception e) // just in case of RuntimeExceptions
   {
     // couldn't find a setter
     return null;
   }
 }
 Method getName(Method m, Class c, boolean includeExtensions) {
   if (!includeExtensions) return null;
   try {
     if (m.getName().startsWith("get")) {
       return c.getMethod("name" + (m.getName().substring(3)), new Class[] {});
     } else if (m.getName().startsWith("is")) {
       return c.getMethod("name" + (m.getName().substring(2)), new Class[] {});
     } else return null;
   } catch (Exception e) // just in case of RuntimeExceptions
   {
     // couldn't find a domain
     return null;
   }
 }
 /* If it exists, returns a method of the form 'public boolean hideFoo() { ...}'.  In this method the developer can declare
 whether or not he wants to hide this property.  If there is no such method, we must assume that the property is to be
 shown. */
 Method getHidden(Method m, Class c, boolean includeExtensions) {
   if (!includeExtensions) return null;
   try {
     if (m.getName().startsWith("get")) {
       Method m2 = c.getMethod("hide" + (m.getName().substring(3)), new Class[] {});
       if (m2.getReturnType() == Boolean.TYPE) return m2;
     } else if (m.getName().startsWith("is")) {
       Method m2 = c.getMethod("hide" + (m.getName().substring(2)), new Class[] {});
       if (m2.getReturnType() == Boolean.TYPE) return m2;
     }
   } catch (Exception e) {
     // couldn't find a domain
   }
   return null;
 }
 private static Method findMethod(ObjArray methods, Symbol name, Symbol signature) {
   int len = (int) methods.getLength();
   // methods are sorted, so do binary search
   int l = 0;
   int h = len - 1;
   while (l <= h) {
     int mid = (l + h) >> 1;
     Method m = (Method) methods.getObjAt(mid);
     int res = m.getName().fastCompare(name);
     if (res == 0) {
       // found matching name; do linear search to find matching signature
       // first, quick check for common case
       if (m.getSignature().equals(signature)) return m;
       // search downwards through overloaded methods
       int i;
       for (i = mid - 1; i >= l; i--) {
         Method m1 = (Method) methods.getObjAt(i);
         if (!m1.getName().equals(name)) break;
         if (m1.getSignature().equals(signature)) return m1;
       }
       // search upwards
       for (i = mid + 1; i <= h; i++) {
         Method m1 = (Method) methods.getObjAt(i);
         if (!m1.getName().equals(name)) break;
         if (m1.getSignature().equals(signature)) return m1;
       }
       // not found
       if (Assert.ASSERTS_ENABLED) {
         int index = linearSearch(methods, name, signature);
         if (index != -1) {
           throw new DebuggerException("binary search bug: should have found entry " + index);
         }
       }
       return null;
     } else if (res < 0) {
       l = mid + 1;
     } else {
       h = mid - 1;
     }
   }
   if (Assert.ASSERTS_ENABLED) {
     int index = linearSearch(methods, name, signature);
     if (index != -1) {
       throw new DebuggerException("binary search bug: should have found entry " + index);
     }
   }
   return null;
 }
  static {
    try {
      Map<String, Method> orderedMethods = new TreeMap<String, Method>();
      for (Method m : MBeanServerConnection.class.getDeclaredMethods()) {
        orderedMethods.put(m.toGenericString(), m);
      }
      Method[] methods = orderedMethods.values().toArray(new Method[orderedMethods.size()]);
      Map<String, Method> asynchMethods = new TreeMap<String, Method>();
      for (Method asynchMethod : AsynchJMXResponseListener.class.getDeclaredMethods()) {
        asynchMethods.put(asynchMethod.getName(), asynchMethod);
      }

      Map<Method, Byte> m2k = new HashMap<Method, Byte>(methods.length);
      Map<Byte, Method> k2m = new HashMap<Byte, Method>(methods.length);
      Map<Byte, Method> k2am = new HashMap<Byte, Method>(methods.length);
      for (int i = 0; i < methods.length; i++) {
        m2k.put(methods[i], (byte) i);
        k2m.put((byte) i, methods[i]);
        Method asynchMethod = asynchMethods.get(methods[i].getName() + "Response");
        if (asynchMethod == null)
          throw new RuntimeException(
              "Failed to find asynch handler for [" + methods[i].toGenericString() + "]",
              new Throwable());
        k2am.put((byte) i, asynchMethod);
      }
      methodToKey = Collections.unmodifiableMap(m2k);
      keyToMethod = Collections.unmodifiableMap(k2m);
      keyToAsynchMethod = Collections.unmodifiableMap(k2am);
    } catch (Exception ex) {
      throw new RuntimeException(ex);
    }
  }
 /**
  * Registers method if it: a. is public, and b. is named "convertXxx", and c. has a return type of
  * "RexNode" or a subtype d. has a 2 parameters with types ConvertletContext and SqlNode (or a
  * subtype) respectively.
  */
 private void registerNodeTypeMethod(final Method method) {
   if (!Modifier.isPublic(method.getModifiers())) {
     return;
   }
   if (!method.getName().startsWith("convert")) {
     return;
   }
   if (!RexNode.class.isAssignableFrom(method.getReturnType())) {
     return;
   }
   final Class[] parameterTypes = method.getParameterTypes();
   if (parameterTypes.length != 2) {
     return;
   }
   if (parameterTypes[0] != SqlRexContext.class) {
     return;
   }
   final Class parameterType = parameterTypes[1];
   if (!SqlNode.class.isAssignableFrom(parameterType)) {
     return;
   }
   map.put(
       parameterType,
       new SqlRexConvertlet() {
         public RexNode convertCall(SqlRexContext cx, SqlCall call) {
           try {
             return (RexNode) method.invoke(ReflectiveConvertletTable.this, cx, call);
           } catch (IllegalAccessException e) {
             throw Util.newInternal(e, "while converting " + call);
           } catch (InvocationTargetException e) {
             throw Util.newInternal(e, "while converting " + call);
           }
         }
       });
 }
  /**
   * Calls all public methods declared in the class corresponding to the given object. Does not
   * include methods from superclasses.
   *
   * @param object object to call the public methods on
   * @param comparator method comparator, allows running the methods in a specific order
   * @return list of methods invoked, including the parameters used for calling them
   */
  private static List<MethodInvocation> callPublicMethodsInOrder(
      Object object, Comparator<Method> comparator) {
    try {
      List<MethodInvocation> invocations = new ArrayList<>();
      Method[] methods = object.getClass().getDeclaredMethods();
      if (comparator != null) Arrays.sort(methods, comparator);

      for (Method method : methods) {
        if (Modifier.isStatic(method.getModifiers()) || !Modifier.isPublic(method.getModifiers()))
          continue;

        Object[] params = new Object[method.getParameterTypes().length];
        for (int i = 0; i < method.getParameterTypes().length; i++) {
          params[i] = instantiateType(method.getParameterTypes()[i]);
        }
        method.invoke(object, params);
        invocations.add(new MethodInvocation(method.getName(), params));
      }
      return invocations;
    } catch (Exception ex) {
      ex.printStackTrace();
      assertTrue(
          "Error calling public methods on object "
              + object
              + " ("
              + object.getClass().getSimpleName()
              + ")",
          false);
      return new ArrayList<>();
    }
  }
Beispiel #17
0
 public static Method[] findMethodsByName(Class<?> type, String methodName) {
   ArrayBuilder<Method> builder = new ArrayBuilder<Method>(Method.class);
   for (Method method : type.getMethods()) {
     if (methodName.equals(method.getName())) builder.add(method);
   }
   return builder.toArray();
 }
  Entry encode(final T o, final String parentDN) throws LDAPPersistException {
    // Get the attributes that should be included in the entry.
    final LinkedHashMap<String, Attribute> attrMap = new LinkedHashMap<String, Attribute>();
    attrMap.put("objectClass", objectClassAttribute);

    for (final Map.Entry<String, FieldInfo> e : fieldMap.entrySet()) {
      final FieldInfo i = e.getValue();
      if (!i.includeInAdd()) {
        continue;
      }

      final Attribute a = i.encode(o, false);
      if (a != null) {
        attrMap.put(e.getKey(), a);
      }
    }

    for (final Map.Entry<String, GetterInfo> e : getterMap.entrySet()) {
      final GetterInfo i = e.getValue();
      if (!i.includeInAdd()) {
        continue;
      }

      final Attribute a = i.encode(o);
      if (a != null) {
        attrMap.put(e.getKey(), a);
      }
    }

    final String dn = constructDN(o, parentDN, attrMap);
    final Entry entry = new Entry(dn, attrMap.values());

    if (postEncodeMethod != null) {
      try {
        postEncodeMethod.invoke(o, entry);
      } catch (Throwable t) {
        debugException(t);

        if (t instanceof InvocationTargetException) {
          t = ((InvocationTargetException) t).getTargetException();
        }

        throw new LDAPPersistException(
            ERR_OBJECT_HANDLER_ERROR_INVOKING_POST_ENCODE_METHOD.get(
                postEncodeMethod.getName(), type.getName(), getExceptionMessage(t)),
            t);
      }
    }

    setDNAndEntryFields(o, entry);

    if (superclassHandler != null) {
      final Entry e = superclassHandler.encode(o, parentDN);
      for (final Attribute a : e.getAttributes()) {
        entry.addAttribute(a);
      }
    }

    return entry;
  }
    public ProxiedMethod(Method method) {
      this.method = method;
      this.name = // method instanceof Constructor ? "<init>" :
          method.getName();
      this.owner = method.getDeclaringClass();

      StringBuffer jni_sig = new StringBuffer("("), c_sig = new StringBuffer();

      retCapitalized = jni_capitalized(method.getReturnType());
      String[] sigArg = c_signature(method.getReturnType(), "?");
      c_sig.append(retType = sigArg[0]).append(" ").append(name).append("(");
      int i = 0;
      for (Class c : method.getParameterTypes()) {
        jni_sig.append(jni_signature(c));
        if (i > 0) c_sig.append(", ");

        String argName = "arg" + (i + 1);
        sigArg = c_signature(c, argName);
        String argType = sigArg[0];

        argTypes.add(argType);
        argNames.add(argName);
        argValues.add(sigArg[1]);

        c_sig.append(argType).append(" ").append(argName);
        i++;
      }
      c_sig.append(")");
      jni_sig.append(")").append(jni_signature(method.getReturnType()));
      this.jni_signature = jni_sig.toString();
      this.c_signature = c_sig.toString();
    }
Beispiel #20
0
  static <T> T set(Class<T> interf, Object value) {
    Properties p = new Properties();
    Method ms[] = interf.getMethods();

    for (Method m : ms) {
      p.put(m.getName(), value);
    }
    return Configurable.createConfigurable(interf, (Map<Object, Object>) p);
  }
 @Nullable
 public static Method getClassMethod(PhpClass phpClass, String methodName) {
   for (Method method : phpClass.getMethods()) {
     if (method.getName().equals(methodName)) {
       return method;
     }
   }
   return null;
 }
Beispiel #22
0
 public Object invoke(Object proxy, Method m, Object[] args) throws Throwable {
   try {
     String method = m.getName();
     if ("prepareStatement".equals(method) || "createStatement".equals(method))
       log.info("[SQL] >>> " + args[0]);
     return m.invoke(conn, args);
   } catch (InvocationTargetException e) {
     throw e.getTargetException();
   }
 }
Beispiel #23
0
 private static Method findMethod(Class<?> clazz, String methodName) {
   Method[] methods = clazz.getMethods();
   Method result = null;
   for (Method method : methods) {
     if (method.getName().equals(methodName)) {
       result = method;
     }
   }
   return result;
 }
 private static int linearSearch(ObjArray methods, Symbol name, Symbol signature) {
   int len = (int) methods.getLength();
   for (int index = 0; index < len; index++) {
     Method m = (Method) methods.getObjAt(index);
     if (m.getSignature().equals(signature) && m.getName().equals(name)) {
       return index;
     }
   }
   return -1;
 }
Beispiel #25
0
 public Object invoke(Object proxy, Method m, Object[] args) throws Throwable {
   Object obj = null;
   if (CLOSE_METHOD_NAME.equals(m.getName())) {
     SimpleConnectionPool.pushConnectionBackToPool(this);
   } else {
     obj = m.invoke(m_originConnection, args);
   }
   lastAccessTime = System.currentTimeMillis();
   return obj;
 }
 private ArrayList<Object> gatherParamsFromAllMethodsFrom(Class<?> sourceClass) {
   ArrayList<Object> result = new ArrayList<Object>();
   Method[] methods = sourceClass.getDeclaredMethods();
   for (Method method : methods) {
     if (method.getName().startsWith("provide")) {
       if (!Modifier.isStatic(method.getModifiers()))
         throw new RuntimeException(
             "Parameters source method "
                 + method.getName()
                 + " is not declared as static. Modify it to a static method.");
       try {
         result.addAll(Arrays.asList(processParamsIfSingle((Object[]) method.invoke(null))));
       } catch (Exception e) {
         throw new RuntimeException(
             "Cannot invoke parameters source method: " + method.getName(), e);
       }
     }
   }
   return result;
 }
Beispiel #27
0
 public static Method getNonVoidSetter(Class<?> clazz, String fieldName) {
   String methodName = "set" + StringUtils.capitalize(fieldName);
   for (Method method : clazz.getMethods()) {
     if (method.getName().equals(methodName)
         && method.getParameterTypes().length == 1
         && method.getReturnType() != Void.TYPE) {
       return method;
     }
   }
   return null;
 }
  private Method findPublicVoidMethod(Class<?> aClass, String methodName) {
    for (Method method : aClass.getDeclaredMethods()) {
      if (isPublic(method.getModifiers())
          && method.getReturnType() == void.class
          && methodName.equals(method.getName())) {
        return method;
      }
    }

    return null;
  }
  public static ArrayList<Method> getClassPublicMethod(PhpClass phpClass) {
    ArrayList<Method> methods = new ArrayList<Method>();

    for (Method method : phpClass.getMethods()) {
      if (method.getAccess().isPublic() && !method.getName().startsWith("__")) {
        methods.add(method);
      }
    }

    return methods;
  }
Beispiel #30
0
    public void visitMethod(Method method) {

      super.visitMethod(method);
      // now get the MethodInfo back from the ClassInfo for
      // additional work.
      String methodId = method.getName() + method.getSignature();
      OldMethodInfo mi = getITMethodInfo(methodId);
      if (JOPizer.dumpMgci) {
        // GCRT
        new GCRTMethodInfo(mi, method);
      }
    }