Interface Enhancer
-
- All Known Implementing Classes:
EnhancerImpl
public interface Enhancer
Class responsible for performing enhancement.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
discoverTypes(String className, byte[] originalBytes)
Discovers types prior to enhancement.byte[]
enhance(String className, byte[] originalBytes)
Performs the enhancement.
-
-
-
Method Detail
-
enhance
byte[] enhance(String className, byte[] originalBytes) throws EnhancementException
Performs the enhancement. It is possible to invoke this method concurrently, but when doing so make sure no two enhancement tasks are invoked on the same class in parallel: the Enhancer implementations are not required to guard against this.- Parameters:
className
- The name of the class whose bytecode is being enhanced.originalBytes
- The class's original (pre-enhancement) byte code- Returns:
- The enhanced bytecode. If the original bytes are not enhanced, null is returned.
- Throws:
EnhancementException
- Indicates a problem performing the enhancement
-
discoverTypes
void discoverTypes(String className, byte[] originalBytes) throws EnhancementException
Discovers types prior to enhancement. It is possible to invoke this method concurrently.- Parameters:
className
- The name of the class whose bytecode is being analyzed for type discovery.originalBytes
- The class's original (pre-enhancement) byte code- Throws:
EnhancementException
- Indicates a problem during type discovery- Since:
- 6.3
-
-