From: chiba Date: Mon, 20 Jun 2005 17:08:10 +0000 (+0000) Subject: update the tutorial X-Git-Tag: rel_3_17_1_ga~441 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5de7634f05f343ff9573e140ea78a224d4ae3aa4;p=javassist.git update the tutorial git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@183 30ef5769-5b8d-40dd-aea6-55b5d6557bb3 --- diff --git a/src/main/javassist/bytecode/annotation/package.html b/src/main/javassist/bytecode/annotation/package.html index 4be4ae9f..6cf7e538 100644 --- a/src/main/javassist/bytecode/annotation/package.html +++ b/src/main/javassist/bytecode/annotation/package.html @@ -1,6 +1,6 @@ -Annotations. +Annotations API.

This package provides low-level API for editing annotations attributes. diff --git a/tutorial/tutorial.html b/tutorial/tutorial.html index 4cbf6821..709d2148 100644 --- a/tutorial/tutorial.html +++ b/tutorial/tutorial.html @@ -130,8 +130,6 @@ example, the data of method bodies. Thus, after a CtClass object is pruned, the bytecode of a method is not accessible although method names and signatures are accessible. -

(Note: the current version of Javassist turns pruning off by default.) -

To disallow pruning a CtClass, stopPruning() must be called in advance: @@ -155,6 +153,8 @@ cc.defrost(); cc.setSuperclass(...); // OK since the class is not frozen. +

To disallow pruning for all the CtClasses, set +ClassPool.doPruning to false.

Class search path

diff --git a/tutorial/tutorial3.html b/tutorial/tutorial3.html index f19e5c0d..657e629b 100644 --- a/tutorial/tutorial3.html +++ b/tutorial/tutorial3.html @@ -124,10 +124,10 @@ The following methods are part of the methods declared in Move to the first instruction.
  • void move(int index)
    Move to the instruction specified by the given index.
    -
  • hasNext()
    +
  • boolean hasNext()
    Returns true if there is more instructions.
    -
  • next()
    -Returns the index of the next instruction. +
  • int next()
    +Returns the index of the next instruction.
    Note that it does not return the opcode of the next instruction.
  • int byteAt(int index)
    @@ -141,6 +141,18 @@ Inserts a byte array at the index. Branch offsets etc. are automatically adjusted.
    +

    The following code snippet displays all the instructions included +in a method body: + +

    +