Package com.sun.appserv.server.util
Class PreprocessorUtil
java.lang.Object
com.sun.appserv.server.util.PreprocessorUtil
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanInitializes the preprocessor utility with the associated class names array arugment.static booleanIndicates whether or not the preprocessor is enabledstatic byte[]processClass(String className, byte[] classBytes) Processes a class through the preprocessor.
-
Constructor Details
-
PreprocessorUtil
public PreprocessorUtil()
-
-
Method Details
-
init
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
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.
-