Commit 42ae0f49 authored by Eric Bruneton's avatar Eric Bruneton

Merge branch 'fix-javadoc' into 'master'

parent f1cf5733
Pipeline #343 passed with stage
in 6 minutes and 8 seconds
......@@ -165,12 +165,24 @@ public abstract class Remapper {
return w.toString();
}
/** @deprecated use {@link #createSignatureRemapper} instead. */
/**
* Creates a new remapper for signatures.
*
* @param v the SignatureVisitor the remapper must delegate to.
* @return the newly created remapper.
* @deprecated use {@link #createSignatureRemapper} instead.
*/
@Deprecated
protected SignatureVisitor createRemappingSignatureAdapter(SignatureVisitor v) {
return new SignatureRemapper(v, this);
}
/**
* Creates a new remapper for signatures.
*
* @param v the SignatureVisitor the remapper must delegate to.
* @return the newly created remapper.
*/
protected SignatureVisitor createSignatureRemapper(SignatureVisitor v) {
return createRemappingSignatureAdapter(v);
}
......
......@@ -77,7 +77,7 @@ import org.junit.runners.Parameterized.Parameter;
* public class MyParameterizedTest extends AsmTest {
*
* @Parameters(name = NAME)
* public static Collection<Object[]> data() {
* public static Collection&lt;Object[]&gt; data() {
* return data(Api.ASM5, Api.ASM6);
* }
*
......@@ -140,12 +140,12 @@ public abstract class AsmTest {
this.name = name;
}
/** Returns the fully qualified name of this class. */
/** @return the fully qualified name of this class. */
public String getName() {
return name;
}
/** Returns the internal name of this class. */
/** @return the internal name of this class. */
public String getInternalName() {
return name.endsWith("module-info") ? "module-info" : name.replace('.', '/');
}
......@@ -184,7 +184,7 @@ public abstract class AsmTest {
return false;
}
/** Returns the content of this class. */
/** @return the content of this class. */
public byte[] getBytes() {
InputStream inputStream = null;
try {
......@@ -234,7 +234,7 @@ public abstract class AsmTest {
/**
* Returns the int value of this version, as expected by ASM.
*
* @return one of {@link Opcodes.ASM4},{@link Opcodes.ASM5} or {@link Opcodes.ASM6}.
* @return one of the ASM4, ASM5 or ASM6 constants from the ASM Opcodes interface.
*/
public int value() {
return value;
......@@ -310,7 +310,7 @@ public abstract class AsmTest {
* representation details (e.g. the order of the constants in the constant pool, the order of
* attributes and annotations, and low level details such as ldc vs ldc_w instructions).
*
* @param expectedString a string which should be contained in a dump of the subject class.
* @param expectedClassFile a class file content which should be equal to the subject class.
*/
public void isEqualTo(byte[] expectedClassFile) {
try {
......
......@@ -96,9 +96,6 @@ public abstract class AbstractInsnNode {
* The runtime visible type annotations of this instruction. This field is only used for real
* instructions (i.e. not for labels, frames, or line number nodes). This list is a list of {@link
* TypeAnnotationNode} objects. May be <tt>null</tt>.
*
* @associates org.objectweb.asm.tree.TypeAnnotationNode
* @label visible
*/
public List<TypeAnnotationNode> visibleTypeAnnotations;
......@@ -106,9 +103,6 @@ public abstract class AbstractInsnNode {
* The runtime invisible type annotations of this instruction. This field is only used for real
* instructions (i.e. not for labels, frames, or line number nodes). This list is a list of {@link
* TypeAnnotationNode} objects. May be <tt>null</tt>.
*
* @associates org.objectweb.asm.tree.TypeAnnotationNode
* @label invisible
*/
public List<TypeAnnotationNode> invisibleTypeAnnotations;
......
......@@ -109,66 +109,46 @@ public class ClassNode extends ClassVisitor {
/**
* The runtime visible annotations of this class. This list is a list of {@link AnnotationNode}
* objects. May be <tt>null</tt>.
*
* @associates org.objectweb.asm.tree.AnnotationNode
* @label visible
*/
public List<AnnotationNode> visibleAnnotations;
/**
* The runtime invisible annotations of this class. This list is a list of {@link AnnotationNode}
* objects. May be <tt>null</tt>.
*
* @associates org.objectweb.asm.tree.AnnotationNode
* @label invisible
*/
public List<AnnotationNode> invisibleAnnotations;
/**
* The runtime visible type annotations of this class. This list is a list of {@link
* TypeAnnotationNode} objects. May be <tt>null</tt>.
*
* @associates org.objectweb.asm.tree.TypeAnnotationNode
* @label visible
*/
public List<TypeAnnotationNode> visibleTypeAnnotations;
/**
* The runtime invisible type annotations of this class. This list is a list of {@link
* TypeAnnotationNode} objects. May be <tt>null</tt>.
*
* @associates org.objectweb.asm.tree.TypeAnnotationNode
* @label invisible
*/
public List<TypeAnnotationNode> invisibleTypeAnnotations;
/**
* The non standard attributes of this class. This list is a list of {@link Attribute} objects.
* May be <tt>null</tt>.
*
* @associates org.objectweb.asm.Attribute
*/
public List<Attribute> attrs;
/**
* Informations about the inner classes of this class. This list is a list of {@link
* InnerClassNode} objects.
*
* @associates org.objectweb.asm.tree.InnerClassNode
*/
public List<InnerClassNode> innerClasses;
/**
* The fields of this class. This list is a list of {@link FieldNode} objects.
*
* @associates org.objectweb.asm.tree.FieldNode
*/
public List<FieldNode> fields;
/**
* The methods of this class. This list is a list of {@link MethodNode} objects.
*
* @associates org.objectweb.asm.tree.MethodNode
*/
public List<MethodNode> methods;
......
......@@ -69,44 +69,30 @@ public class FieldNode extends FieldVisitor {
/**
* The runtime visible annotations of this field. This list is a list of {@link AnnotationNode}
* objects. May be <tt>null</tt>.
*
* @associates org.objectweb.asm.tree.AnnotationNode
* @label visible
*/
public List<AnnotationNode> visibleAnnotations;
/**
* The runtime invisible annotations of this field. This list is a list of {@link AnnotationNode}
* objects. May be <tt>null</tt>.
*
* @associates org.objectweb.asm.tree.AnnotationNode
* @label invisible
*/
public List<AnnotationNode> invisibleAnnotations;
/**
* The runtime visible type annotations of this field. This list is a list of {@link
* TypeAnnotationNode} objects. May be <tt>null</tt>.
*
* @associates org.objectweb.asm.tree.TypeAnnotationNode
* @label visible
*/
public List<TypeAnnotationNode> visibleTypeAnnotations;
/**
* The runtime invisible type annotations of this field. This list is a list of {@link
* TypeAnnotationNode} objects. May be <tt>null</tt>.
*
* @associates org.objectweb.asm.tree.TypeAnnotationNode
* @label invisible
*/
public List<TypeAnnotationNode> invisibleTypeAnnotations;
/**
* The non standard attributes of this field. This list is a list of {@link Attribute} objects.
* May be <tt>null</tt>.
*
* @associates org.objectweb.asm.Attribute
*/
public List<Attribute> attrs;
......
......@@ -75,44 +75,30 @@ public class MethodNode extends MethodVisitor {
/**
* The runtime visible annotations of this method. This list is a list of {@link AnnotationNode}
* objects. May be <tt>null</tt>.
*
* @associates org.objectweb.asm.tree.AnnotationNode
* @label visible
*/
public List<AnnotationNode> visibleAnnotations;
/**
* The runtime invisible annotations of this method. This list is a list of {@link AnnotationNode}
* objects. May be <tt>null</tt>.
*
* @associates org.objectweb.asm.tree.AnnotationNode
* @label invisible
*/
public List<AnnotationNode> invisibleAnnotations;
/**
* The runtime visible type annotations of this method. This list is a list of {@link
* TypeAnnotationNode} objects. May be <tt>null</tt>.
*
* @associates org.objectweb.asm.tree.TypeAnnotationNode
* @label visible
*/
public List<TypeAnnotationNode> visibleTypeAnnotations;
/**
* The runtime invisible type annotations of this method. This list is a list of {@link
* TypeAnnotationNode} objects. May be <tt>null</tt>.
*
* @associates org.objectweb.asm.tree.TypeAnnotationNode
* @label invisible
*/
public List<TypeAnnotationNode> invisibleTypeAnnotations;
/**
* The non standard attributes of this method. This list is a list of {@link Attribute} objects.
* May be <tt>null</tt>.
*
* @associates org.objectweb.asm.Attribute
*/
public List<Attribute> attrs;
......@@ -128,33 +114,22 @@ public class MethodNode extends MethodVisitor {
/**
* The runtime visible parameter annotations of this method. These lists are lists of {@link
* AnnotationNode} objects. May be <tt>null</tt>.
*
* @associates org.objectweb.asm.tree.AnnotationNode
* @label invisible parameters
*/
public List<AnnotationNode>[] visibleParameterAnnotations;
/**
* The runtime invisible parameter annotations of this method. These lists are lists of {@link
* AnnotationNode} objects. May be <tt>null</tt>.
*
* @associates org.objectweb.asm.tree.AnnotationNode
* @label visible parameters
*/
public List<AnnotationNode>[] invisibleParameterAnnotations;
/**
* The instructions of this method. This list is a list of {@link AbstractInsnNode} objects.
*
* @associates org.objectweb.asm.tree.AbstractInsnNode
* @label instructions
*/
public InsnList instructions;
/**
* The try catch blocks of this method. This list is a list of {@link TryCatchBlockNode} objects.
*
* @associates org.objectweb.asm.tree.TryCatchBlockNode
*/
public List<TryCatchBlockNode> tryCatchBlocks;
......@@ -167,24 +142,18 @@ public class MethodNode extends MethodVisitor {
/**
* The local variables of this method. This list is a list of {@link LocalVariableNode} objects.
* May be <tt>null</tt>
*
* @associates org.objectweb.asm.tree.LocalVariableNode
*/
public List<LocalVariableNode> localVariables;
/**
* The visible local variable annotations of this method. This list is a list of {@link
* LocalVariableAnnotationNode} objects. May be <tt>null</tt>
*
* @associates org.objectweb.asm.tree.LocalVariableAnnotationNode
*/
public List<LocalVariableAnnotationNode> visibleLocalVariableAnnotations;
/**
* The invisible local variable annotations of this method. This list is a list of {@link
* LocalVariableAnnotationNode} objects. May be <tt>null</tt>
*
* @associates org.objectweb.asm.tree.LocalVariableAnnotationNode
*/
public List<LocalVariableAnnotationNode> invisibleLocalVariableAnnotations;
......
......@@ -56,6 +56,8 @@ public class ModuleExportNode {
* Constructs a new {@link ModuleExportNode}.
*
* @param packaze the internal name of the exported package.
* @param access the package access flags, one or more of {@code ACC_SYNTHETIC} and {@code
* ACC_MANDATED}.
* @param modules a list of modules that can access this exported package, specified with fully
* qualified names (using dots).
*/
......
......@@ -53,6 +53,8 @@ public class ModuleOpenNode {
* Constructs a new {@link ModuleOpenNode}.
*
* @param packaze the parameter's name.
* @param access the module access flags, one or more of {@code ACC_SYNTHETIC} and {@code
* ACC_MANDATED}.
* @param modules a list of modules that can access to this open package.
*/
public ModuleOpenNode(final String packaze, final int access, final List<String> modules) {
......
......@@ -56,18 +56,12 @@ public class TryCatchBlockNode {
/**
* The runtime visible type annotations on the exception handler type. This list is a list of
* {@link TypeAnnotationNode} objects. May be <tt>null</tt>.
*
* @associates org.objectweb.asm.tree.TypeAnnotationNode
* @label visible
*/
public List<TypeAnnotationNode> visibleTypeAnnotations;
/**
* The runtime invisible type annotations on the exception handler type. This list is a list of
* {@link TypeAnnotationNode} objects. May be <tt>null</tt>.
*
* @associates org.objectweb.asm.tree.TypeAnnotationNode
* @label invisible
*/
public List<TypeAnnotationNode> invisibleTypeAnnotations;
......
......@@ -178,13 +178,13 @@ public abstract class Printer {
public abstract void visitSource(final String source, final String debug);
/**
* Module. See {@link org.objectweb.asm.ClassVisitor#visitModule(String, int)}.
* Module. See {@link org.objectweb.asm.ClassVisitor#visitModule}.
*
* @param name module name.
* @param access module flags, among {@code ACC_OPEN}, {@code ACC_SYNTHETIC} and {@code
* ACC_MANDATED}.
* @param version module version or null.
* @return
* @return the printer.
*/
public Printer visitModule(String name, int access, String version) {
throw new RuntimeException("Must be overriden");
......
......@@ -45,8 +45,6 @@ import org.objectweb.asm.TypePath;
*
* <p>The trace printed when visiting the <tt>Hello</tt> class is the following:
*
* <p>
*
* <blockquote>
*
* <pre>
......@@ -67,8 +65,6 @@ import org.objectweb.asm.TypePath;
*
* where <tt>Hello</tt> is defined by:
*
* <p>
*
* <blockquote>
*
* <pre>
......
......@@ -74,6 +74,7 @@ import org.xml.sax.helpers.XMLReaderFactory;
* <blockquote>
*
* <table border="1" cellspacing="0" cellpadding="3">
* <caption>Possible TransformerFactory values</caption>
* <tr>
* <td>jd.xslt</td>
* <td>jd.xml.xslt.trax.TransformerFactoryImpl</td>
......
......@@ -66,6 +66,7 @@ public final class SAXCodeAdapter extends MethodVisitor {
* Constructs a new {@link SAXCodeAdapter SAXCodeAdapter} object.
*
* @param sa content handler that will be used to send SAX 2.0 events.
* @param access the method access flags.
*/
public SAXCodeAdapter(final SAXAdapter sa, final int access) {
super(Opcodes.ASM6);
......
......@@ -34,8 +34,10 @@ package org.objectweb.asm;
* attributes can be generated with the {@link #putAnnotations()} method. Similarly, arrays of such
* lists can be used to generate Runtime[In]VisibleParameterAnnotations attributes.
*
* @see https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7.16
* @see https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7.20
* @see <a href="https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7.16">JVMS
* 4.7.16</a>
* @see <a href="https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7.20>JVMS
* 4.7.20</a>
* @author Eric Bruneton
* @author Eugene Kuleshov
*/
......
......@@ -31,8 +31,10 @@ package org.objectweb.asm;
* A non standard class, field, method or code attribute, as defined in the Java Virtual Machine
* Specification (JVMS).
*
* @see https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7
* @see https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7.3
* @see <a href="https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7">JVMS
* 4.7</a>
* @see <a href="https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7.3">JVMS
* 4.7.3</a>
* @author Eric Bruneton
* @author Eugene Kuleshov
*/
......
......@@ -1436,7 +1436,7 @@ public class ClassReader {
// insertFrame to true during the previous iteration. The actual
// frame content will be computed in MethodWriter.
if (insertFrame) {
if ((context.flags & EXPAND_FRAMES) != 0) {
if ((context.parsingOptions & EXPAND_FRAMES) != 0) {
mv.visitFrame(ClassWriter.F_INSERT, 0, null, 0, null);
}
insertFrame = false;
......
......@@ -52,7 +52,8 @@ class Context {
* The offsets, from the start of the class file structure, to the first byte of each element of
* the bootstrap_methods array (in the BootstrapMethod attribute).
*
* @see https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7.23
* @see <a href="https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7.23">JVMS
* 4.7.23</a>
*/
int[] bootstrapMethodOffsets;
......
......@@ -33,7 +33,8 @@ package org.objectweb.asm;
* can be chained together, with their {@link #nextHandler} field, to describe a full JVMS
* exception_table array.
*
* @see https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7.3
* @see <a href="https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7.3">JVMS
* 4.7.3</a>
* @author Eric Bruneton
*/
final class Handler {
......
......@@ -87,8 +87,8 @@ public class Label {
/**
* Field used to associate user information to a label. Warning: this field is used by the ASM
* tree package. In order to use it with the ASM tree package you must override the {@link
* org.objectweb.asm.tree.MethodNode#getLabelNode} method.
* tree package. In order to use it with the ASM tree package you must override the getLabelNode
* method in MethodNode.
*/
public Object info;
......
......@@ -53,7 +53,9 @@ public class TypePath {
* Specification (JVMS) - corresponding to this TypePath is stored. The first byte of the
* structure in this array is given by {@link #typePathOffset}.
*
* @see https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7.20.2
* @see <a
* href="https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7.20.2">JVMS
* 4.7.20.2</a>
*/
private final byte[] typePathContainer;
......
......@@ -176,8 +176,11 @@ public class TypeReference {
* fields which reference bytecode offsets are set to 0 (these offsets are ignored in ClassReader,
* and recomputed in MethodWriter).
*
* @see https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7.20
* @see https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7.20.1
* @see <a href="https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7.20">JVMS
* 4.7.20</a>
* @see <a
* href="https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.7.20.1">JVMS
* 4.7.20.1</a>
*/
private final int targetTypeAndInfo;
......@@ -185,7 +188,7 @@ public class TypeReference {
* Creates a new TypeReference.
*
* @param typeRef the int encoded value of the type reference, as received in a visit method
* related to type annotations, such as {@link ClassVisitor#visitTypeAnnotation()}.
* related to type annotations, such as {@link ClassVisitor#visitTypeAnnotation}.
*/
public TypeReference(final int typeRef) {
this.targetTypeAndInfo = typeRef;
......
......@@ -162,7 +162,6 @@ subprojects {
googleJavaFormat.toolVersion = '1.4'
sourceCompatibility = '1.5'
targetCompatibility = '1.5'
javadoc { failOnError = false } // TODO fix the Javadoc and remove this!
dependencies {
requires.each { projectName -> compile project(projectName) }
depends.each { artifactName -> compile artifactName }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment