Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

translate redefine command #127

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions site/src/site/sphinx/en/redefine.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
redefine
===

> Load external `.class` files,redefine classes that jvm already loads。

Reference:[Instrumentation#redefineClasses](https://docs.oracle.com/javase/8/docs/api/java/lang/instrument/Instrumentation.html#redefineClasses-java.lang.instrument.ClassDefinition...-)

> Caution: classes that have been redefined can not be reverted,redefine may fail(add new field for instance),refer JVM original document.

### Parameters explanations

|Parameter Name| Parameter Description|
|---:|:---|
|[c:]|ClassLoader的hashcode|
|[p:]|full path of external `.class` files, support multiple files at a time|


### Usage

```
redefine -p /tmp/Test.class
redefine -c 327a647b -p /tmp/Test.class /tmp/Test\$Inner.class
```