public static void invokeMethod(GeneratorAdapter adapter, Type type, Method method) { if (type.getClass().isInterface()) adapter.invokeInterface(type, method); else adapter.invokeVirtual(type, method); }