Java Method Call invoke(String method)

Here you can find the source of invoke(String method)

Description

invoke

License

Open Source License

Declaration

private static void invoke(String method) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.lang.reflect.Method;
import org.eclipse.core.runtime.Platform;
import org.osgi.framework.Bundle;

public class Main {
    private static final String HELP_UI_PLUGIN_ID = "org.eclipse.help.ui";
    private static final String LOOP_CLASS_NAME = "org.eclipse.help.ui.internal.HelpUIEventLoop";

    private static void invoke(String method) {
        try {/*from   w  w w.  j ava2  s.  c  om*/
            Bundle bundle = Platform.getBundle(HELP_UI_PLUGIN_ID);
            if (bundle == null) {
                return;
            }
            Class c = bundle.loadClass(LOOP_CLASS_NAME);
            Method m = c.getMethod(method, new Class[] {});
            m.invoke(null, new Object[] {});
        } catch (Exception e) {
        }
    }
}

Related

  1. invoke(ObjectName objectName, Object[] params, String[] signature, String operationName)
  2. invoke(ObjectName objectName, String attribute, Object[] params, String[] signatur)
  3. invoke(Optional method, Class clazz, Object... args)
  4. invoke(String className, String methodName, Class[] paramTypes, Object... params)
  5. invoke(String cls_name, String method, Class[] param_cls, Object cls, Object[] params)
  6. invoke(String methodName, Object obj)
  7. invoke(String methodName, Object object, Class[] argTypes, Object[] args)
  8. invoke(String methodName, Object target, Class targetClass, Object[] args)
  9. invoke(String name, Object object, Object... args)