Example usage for org.apache.commons.lang.reflect MethodUtils invokeExactStaticMethod

List of usage examples for org.apache.commons.lang.reflect MethodUtils invokeExactStaticMethod

Introduction

In this page you can find the example usage for org.apache.commons.lang.reflect MethodUtils invokeExactStaticMethod.

Prototype

public static Object invokeExactStaticMethod(Class cls, String methodName, Object[] args)
        throws NoSuchMethodException, IllegalAccessException, InvocationTargetException 

Source Link

Document

Invoke a static method whose parameter types match exactly the object types.

This uses reflection to invoke the method obtained from a call to #getAccessibleMethod(Class,String,Class[]) .

Usage

From source file:hr.fer.spocc.Main.java

public static void main(String[] args) throws NoSuchMethodException, IllegalAccessException,
        InvocationTargetException, ClassNotFoundException {
    if (args.length < 1)
        args = new String[1];
    args[0] = "src/test/resources/minusLang-01.source";
    MethodUtils.invokeExactStaticMethod(Class.forName("hr.fer.spocc.lexer._GeneratedMain"), "main",
            new Object[] { args });
}