com.sun.appserv.server.util
Class PreprocessorUtil

java.lang.Object
  extended by 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 Summary
PreprocessorUtil()
           
 
Method Summary
static boolean init(String[] ppClassNames)
          Initializes the preprocessor utility with the associated class names array arugment.
static boolean isPreprocessorEnabled()
          Indicates whether or not the preprocessor is enabled
static byte[] processClass(String className, byte[] classBytes)
          Processes a class through the preprocessor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreprocessorUtil

public PreprocessorUtil()
Method Detail

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.


Copyright © 2008 Mort Bay Consulting. All Rights Reserved.