mirror of
https://github.com/alibaba/arthas.git
synced 2026-11-12 22:41:26 +00:00
update doc
This commit is contained in:
1 parent
72e97ebc10
commit
9a7cef6f87
10 files changed
+142
-7
No files matched your search
@@ -109,6 +109,7 @@
|
||||
<li class="toctree-l2 current"><a class="current reference internal" href="#">redefine</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#options">Options</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#usage">Usage</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#restrictions-of-the-redefine-command">Restrictions of the redefine command</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="monitor.html">monitor</a></li>
|
||||
@@ -226,6 +227,42 @@
|
||||
redefine -c 327a647b -p /tmp/Test.class /tmp/Test$Inner.class</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="restrictions-of-the-redefine-command">
|
||||
<span id="restrictions-of-the-redefine-command"></span><h2>Restrictions of the redefine command<a class="headerlink" href="#restrictions-of-the-redefine-command" title="Permalink to this headline">¶</a></h2>
|
||||
<ul>
|
||||
<li><p class="first">New field/method is not allowed</p>
|
||||
</li>
|
||||
<li><p class="first">The function that is running, no exit can not take effect, such as the new <tt class="docutils literal">System.out.println</tt> added below, only the <tt class="docutils literal">run()</tt> function will take effect.</p>
|
||||
<div class="highlight-java notranslate"><div class="highlight hljs"><pre class="java">public class MathGame {
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
MathGame game = new MathGame();
|
||||
while (true) {
|
||||
game.run();
|
||||
TimeUnit.SECONDS.sleep(1);
|
||||
// This doesn't work because the code keeps running in while
|
||||
System.out.println("in loop");
|
||||
}
|
||||
}
|
||||
|
||||
public void run() throws InterruptedException {
|
||||
// This works because the run() function ends completely every time
|
||||
System.out.println("call run()");
|
||||
try {
|
||||
int number = random.nextInt();
|
||||
List<Integer> primeFactors = primeFactors(number);
|
||||
print(number, primeFactors);
|
||||
|
||||
} catch (Exception e) {
|
||||
System.out.println(String.format("illegalArgumentCount:%3d, ", illegalArgumentCount) + e.getMessage());
|
||||
}
|
||||
}
|
||||
</pre></div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="highlight-default notranslate"><pre class="literal-block"></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user