Class ModuleAccessible

java.lang.Object
net.officefloor.test.module.ModuleAccessible

public class ModuleAccessible extends Object
Checks whether a Package is accessible.
Author:
Daniel Sagenschneider
  • Method Details

    • getOpenModuleJvmArgument

      public static String getOpenModuleJvmArgument(String moduleName, String packageName)
      Obtains the JVM command line argument to open the Module Package.
      Parameters:
      moduleName - Name of Module.
      packageName - Package name within the Module to open.
      Returns:
      JVM command line argument to open the Module Package.
    • isFieldAvailable

      public static boolean isFieldAvailable(Class<?> clazz, String fieldName)
      Indicates if the Field is available.
      Parameters:
      clazz - Class containing the Field.
      fieldName - Name of the Field.
      Returns:
      true if Field is available.
    • setFieldValue

      public static void setFieldValue(Object object, String fieldName, Object value, String message)
      Specifies the Field value.
      Parameters:
      object - Object containing the Field.
      fieldName - Name of the Field.
      value - Value to set on the Field.
      message - Message indicating what requires setting the Field value.
    • setFieldValue

      public static void setFieldValue(Object object, Field field, Object value, String message)
      Specifies the Field value.
      Parameters:
      object - Object containing the Field.
      field - Field.
      value - Value to set on the Field.
      message - Message indicating what requires setting the Field value.
    • getFieldValue

      public static Object getFieldValue(Object object, String fieldName, String message)
      Obtains the Field value.
      Parameters:
      object - Object containing the Field.
      fieldName - Name of the Field.
      message - Message indicating what requires the Field value.
      Returns:
      Field value.
    • getFieldValue

      public static Object getFieldValue(Object object, Class<?> clazz, String fieldName, String message)
      Obtains the Field value.
      Parameters:
      object - Object containing the Field. May be null for static Field.
      clazz - Class containing the field.
      fieldName - Name of the Field.
      message - Message indicating what requires the Field value.
      Returns:
      Field value.
    • getFieldValue

      public static Object getFieldValue(Object object, Field field, String message)
      Obtains the Field value.
      Parameters:
      object - Object containing the Field.
      field - Field.
      message - Message indicating what requires the Field value.
      Returns:
      Field value.
    • invokeMethod

      public static Object invokeMethod(Object object, Method method, String message, Object... parameters)
      Invokes the Method.
      Parameters:
      object - Object containing the Method. May be null for static Method.
      method - Method.
      message - Messaging indicating what requires invoking the Method.
      parameters - Parameters to the Method invocation.
      Returns:
      Method return.