public class TopLinkWeaver extends Object implements ClassTransformer
Modifier and Type | Field and Description |
---|---|
protected Map |
classDetailsMap |
protected Session |
session |
static String |
WEAVER_COULD_NOT_WRITE |
static String |
WEAVER_FAILED |
static String |
WEAVER_NOT_OVERWRITING |
static String |
WEAVER_TRANSFORMED_CLASS |
static String |
WEAVING_OUTPUT_PATH |
static String |
WEAVING_SHOULD_OVERWRITE |
Constructor and Description |
---|
TopLinkWeaver(Session session,
Map classDetailsMap) |
Modifier and Type | Method and Description |
---|---|
Map |
getClassDetailsMap() |
protected static String |
getShortName(String name) |
protected void |
log(int level,
String msg,
Object[] params) |
protected void |
log(int level,
Throwable t) |
protected void |
outputFile(String className,
byte[] classBytes,
String outputPath) |
byte[] |
transform(ClassLoader loader,
String className,
Class classBeingRedefined,
ProtectionDomain protectionDomain,
byte[] classfileBuffer)
Invoked when a class is being loaded or redefined.
|
public static final String WEAVING_OUTPUT_PATH
public static final String WEAVING_SHOULD_OVERWRITE
public static final String WEAVER_NOT_OVERWRITING
public static final String WEAVER_COULD_NOT_WRITE
public static final String WEAVER_FAILED
public static final String WEAVER_TRANSFORMED_CLASS
protected Session session
protected Map classDetailsMap
public Map getClassDetailsMap()
public byte[] transform(ClassLoader loader, String className, Class classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws IllegalClassFormatException
ClassTransformer
transform
in interface ClassTransformer
loader
- The defining loader of the class to be
transformed, may be null if the bootstrap loaderclassName
- The name of the class in the internal form
of fully qualified class and interface namesclassBeingRedefined
- If this is a redefine, the
class being redefined, otherwise nullprotectionDomain
- The protection domain of the
class being defined or redefinedclassfileBuffer
- The input byte buffer in class
file format - must not be modifiedIllegalClassFormatException
- If the input does
not represent a well-formed class fileprotected void log(int level, Throwable t)
Copyright © 2023. All rights reserved.