|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.xml.bind.v2.bytecode.ClassTailor
public final class ClassTailor
Replaces a few constant pool tokens from a class "template" and then loads it into the VM.
| Method Summary | |
|---|---|
static byte[] |
tailor(Class templateClass,
String newClassName,
String... replacements)
|
static byte[] |
tailor(InputStream image,
String templateClassName,
String newClassName,
String... replacements)
Customizes a class file by replacing constant pools. |
static String |
toVMClassName(Class c)
Returns the class name in the JVM format (such as "java/lang/String") |
static String |
toVMTypeName(Class c)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static String toVMClassName(Class c)
public static String toVMTypeName(Class c)
public static byte[] tailor(Class templateClass,
String newClassName,
String... replacements)
public static byte[] tailor(InputStream image,
String templateClassName,
String newClassName,
String... replacements)
image - The image of the template class.replacements - A list of pair of strings that specify the substitution
String[]{search_0, replace_0, search_1, replace_1, ..., search_n, replace_n }
The search strings found in the constant pool will be replaced by the corresponding
replacement string.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||