aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/javassist/CtNewMethod.java
diff options
context:
space:
mode:
authorchibash <chiba@javassist.org>2015-01-06 02:54:09 +0900
committerchibash <chiba@javassist.org>2015-01-06 02:54:09 +0900
commit5a6662f29d49404965a9138d323d09aafc12128e (patch)
tree8f69a67ce83d946add6daaae63cc4c93cbcaf8e7 /src/main/javassist/CtNewMethod.java
parentec3afdfb5d58b98ae8091d59f84d0d2f7f97a725 (diff)
downloadjavassist-5a6662f29d49404965a9138d323d09aafc12128e.tar.gz
javassist-5a6662f29d49404965a9138d323d09aafc12128e.zip
preparation for 3.19 release. fixed bugs in javadoc comments
Diffstat (limited to 'src/main/javassist/CtNewMethod.java')
-rw-r--r--src/main/javassist/CtNewMethod.java32
1 files changed, 17 insertions, 15 deletions
diff --git a/src/main/javassist/CtNewMethod.java b/src/main/javassist/CtNewMethod.java
index f134dcdd..48d8629a 100644
--- a/src/main/javassist/CtNewMethod.java
+++ b/src/main/javassist/CtNewMethod.java
@@ -34,7 +34,7 @@ public class CtNewMethod {
* The source code must include not only the method body
* but the whole declaration, for example,
*
- * <ul><pre>"public Object id(Object obj) { return obj; }"</pre></ul>
+ * <pre>"public Object id(Object obj) { return obj; }"</pre>
*
* @param src the source text.
* @param declaring the class to which the created method is added.
@@ -50,7 +50,7 @@ public class CtNewMethod {
* The source code must include not only the method body
* but the whole declaration, for example,
*
- * <ul><pre>"public Object id(Object obj) { return obj; }"</pre></ul>
+ * <pre>"public Object id(Object obj) { return obj; }"</pre>
*
* <p>If the source code includes <code>$proceed()</code>, then
* it is compiled into a method call on the specified object.
@@ -307,9 +307,10 @@ public class CtNewMethod {
*
* <p>The following method is an example of the created method.
*
- * <ul><pre>int f(int p, int q) {
+ * <pre>
+ * int f(int p, int q) {
* return super.f(p, q);
- * }</pre></ul>
+ * }</pre>
*
* <p>The name of the created method can be changed by
* <code>setName()</code>.
@@ -377,15 +378,14 @@ public class CtNewMethod {
*
* <p>The method specified by <code>body</code> must have this singature:
*
- * <ul><code>Object method(Object[] params, &lt;type&gt; cvalue)
- * </code></ul>
+ * <pre>Object method(Object[] params, &lt;type&gt; cvalue)</pre>
*
* <p>The type of the <code>cvalue</code> depends on
* <code>constParam</code>.
* If <code>constParam</code> is <code>null</code>, the signature
* must be:
*
- * <ul><code>Object method(Object[] params)</code></ul>
+ * <pre>Object method(Object[] params)</pre>
*
* <p>The method body copied from <code>body</code> is wrapped in
* parameter-conversion code, which converts parameters specified by
@@ -394,12 +394,13 @@ public class CtNewMethod {
* type to the type specified by <code>returnType</code>. Thus,
* the resulting method body is as follows:
*
- * <ul><pre>Object[] params = new Object[] { p0, p1, ... };
+ * <pre>
+ * Object[] params = new Object[] { p0, p1, ... };
* &lt;<i>type</i>&gt; cvalue = &lt;<i>constant-value</i>&gt;;
* <i>... copied method body ...</i>
* Object result = &lt;<i>returned value</i>&gt;
* return (<i>&lt;returnType&gt;</i>)result;
- * </pre></ul>
+ * </pre>
*
* <p>The variables <code>p0</code>, <code>p2</code>, ... represent
* formal parameters of the created method.
@@ -413,7 +414,8 @@ public class CtNewMethod {
*
* <p><i>Example:</i>
*
- * <ul><pre>ClassPool pool = ... ;
+ * <pre>
+ * ClassPool pool = ... ;
* CtClass vec = pool.makeClass("intVector");
* vec.setSuperclass(pool.get("java.util.Vector"));
* CtMethod addMethod = pool.getMethod("Sample", "add0");
@@ -421,20 +423,20 @@ public class CtNewMethod {
* CtClass[] argTypes = { CtClass.intType };
* CtMethod m = CtNewMethod.wrapped(CtClass.voidType, "add", argTypes,
* null, addMethod, null, vec);
- * vec.addMethod(m);</pre></ul>
+ * vec.addMethod(m);</pre>
*
* <p>where the class <code>Sample</code> is as follows:
*
- * <ul><pre>public class Sample extends java.util.Vector {
+ * <pre>public class Sample extends java.util.Vector {
* public Object add0(Object[] args) {
* super.addElement(args[0]);
* return null;
* }
- * }</pre></ul>
+ * }</pre>
*
* <p>This program produces a class <code>intVector</code>:
*
- * <ul><pre>public class intVector extends java.util.Vector {
+ * <pre>public class intVector extends java.util.Vector {
* public void add(int p0) {
* Object[] args = new Object[] { p0 };
* // begin of the copied body
@@ -442,7 +444,7 @@ public class CtNewMethod {
* Object result = null;
* // end
* }
- * }</pre></ul>
+ * }</pre>
*
* <p>Note that the type of the parameter to <code>add()</code> depends
* only on the value of <code>argTypes</code> passed to