// Path: src/main/java/org/robotframework/formslibrary/FormsLibraryException.java
// public class FormsLibraryException extends RuntimeException {
// 
//     private static final long serialVersionUID = 1L;
// 
//     public static final boolean ROBOT_SUPPRESS_NAME = true;
// 
//     public FormsLibraryException(String message) {
//         super(message);
//     }
// 
//     public FormsLibraryException(Throwable t) {
//         super(t);
//     }
// 
//     public FormsLibraryException(String message, Throwable t) {
//         super(message, t);
//     }
// }


import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import org.robotframework.formslibrary.FormsLibraryException;

package org.robotframework.formslibrary.util;



/**
 * Adding frmall.jar (which contains all the Oracle Forms classes) to the java
 * agent path prevents the application from launching. As a workaround, we don't
 * include the jar, but use reflection to interact with the oracle forms
 * objects.
 */
public class ObjectUtil {

	/**
	 * Remove brackets () from method path.
	 */
	private static String cleanMethodPath(String methodPath) {

		if (methodPath == null || methodPath.trim().length() == 0) {
			return null;
		}
		return methodPath.replaceAll("\\(", "").replaceAll("\\)", "");
	}

	/**
	 * Invoke an object method that returns a boolean result.
	 */
	public static boolean getBoolean(Object object, String methodName) {

		try {
			Method m = object.getClass().getMethod(cleanMethodPath(methodName));
			return (Boolean) m.invoke(object);
		} catch (Exception e) {

// Path: src/main/java/org/robotframework/formslibrary/FormsLibraryException.java
// public class FormsLibraryException extends RuntimeException {
// 
//     private static final long serialVersionUID = 1L;
// 
//     public static final boolean ROBOT_SUPPRESS_NAME = true;
// 
//     public FormsLibraryException(String message) {
//         super(message);
//     }
// 
//     public FormsLibraryException(Throwable t) {
//         super(t);
//     }
// 
//     public FormsLibraryException(String message, Throwable t) {
//         super(message, t);
//     }
// }


// Path: src/main/java/org/robotframework/formslibrary/util/ObjectUtil.java
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import org.robotframework.formslibrary.FormsLibraryException;

package org.robotframework.formslibrary.util;



/**
 * Adding frmall.jar (which contains all the Oracle Forms classes) to the java
 * agent path prevents the application from launching. As a workaround, we don't
 * include the jar, but use reflection to interact with the oracle forms
 * objects.
 */
public class ObjectUtil {

	/**
	 * Remove brackets () from method path.
	 */
	private static String cleanMethodPath(String methodPath) {

		if (methodPath == null || methodPath.trim().length() == 0) {
			return null;
		}
		return methodPath.replaceAll("\\(", "").replaceAll("\\)", "");
	}

	/**
	 * Invoke an object method that returns a boolean result.
	 */
	public static boolean getBoolean(Object object, String methodName) {

		try {
			Method m = object.getClass().getMethod(cleanMethodPath(methodName));
			return (Boolean) m.invoke(object);
		} catch (Exception e) {

			throw new FormsLibraryException("Could not invoke method " + methodName, e);
