public final class ClassDefinition extends Object
Instrumentation.redefineClasses方法的参数块。
用来绑定类 ,需要用新的类文件字节一起重新定义。
Instrumentation.redefineClasses(java.lang.instrument.ClassDefinition...)
| Constructor and Description |
|---|
ClassDefinition(类<?> theClass, byte[] theClassFile)
使用提供的类和类文件字节创建一个新的
ClassDefinition绑定。
|
public ClassDefinition(类<?> theClass, byte[] theClassFile)
ClassDefinition绑定。
不复制提供的缓冲区,只捕获对它的引用。
theClass -在
类需要重新定义
theClassFile - 新的类文件字节
NullPointerException - 如果提供的类或数组是
null 。
public 类<?> getDefinitionClass()
类对象。
public byte[] getDefinitionClassFile()
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.