Class PreprocessorUtil

java.lang.Object
com.sun.appserv.server.util.PreprocessorUtil

public class PreprocessorUtil extends Object
PreprocessorUtil is a utility class for managing the bytecode preprocessor(s). The list of preprocessors are passed in as a string array to the initialize method. If there is a problem initialize any of the preprocessors, all preprocessing is disabled.
  • Constructor Details

    • PreprocessorUtil

      public PreprocessorUtil()
  • Method Details

    • init

      public static boolean init(String[] ppClassNames)
      Initializes the preprocessor utility with the associated class names array arugment.
      Parameters:
      ppClassNames - - the String array of preprocessor class names.
      Returns:
      - true if successful, otherwise false. All preprocessors must successfully initialize for true to be returned.
    • processClass

      public static byte[] processClass(String className, byte[] classBytes)
      Processes a class through the preprocessor.
      Parameters:
      className - - the class name.
      classBytes - - the class byte array.
      Returns:
      - the processed class byte array.
    • isPreprocessorEnabled

      public static boolean isPreprocessorEnabled()
      Indicates whether or not the preprocessor is enabled
      Returns:
      - true of the preprocessor is enabled, otherwise false.