< prev index next >
src/java.base/share/classes/jdk/internal/org/objectweb/asm/util/Printer.java
Print this page
rev 47452 : imported patch jdk-new-asmv6.patch
@@ -144,11 +144,11 @@
}
}
/**
* The ASM API version implemented by this class. The value of this field
- * must be one of {@link Opcodes#ASM4} or {@link Opcodes#ASM5}.
+ * must be one of {@link Opcodes#ASM4}, {@link Opcodes#ASM5} or {@link Opcodes#ASM6}.
*/
protected final int api;
/**
* A buffer that can be used to create strings.
@@ -172,11 +172,11 @@
/**
* Constructs a new {@link Printer}.
*
* @param api
* the ASM API version implemented by this printer. Must be one
- * of {@link Opcodes#ASM4} or {@link Opcodes#ASM5}.
+ * of {@link Opcodes#ASM4}, {@link Opcodes#ASM5} or {@link Opcodes#ASM6}.
*/
protected Printer(final int api) {
this.api = api;
this.buf = new StringBuffer();
this.text = new ArrayList<Object>();
@@ -224,11 +224,29 @@
* between source and compiled elements of the class. May be
* <tt>null</tt>.
*/
public abstract void visitSource(final String source, final String debug);
+
/**
+ * Module.
+ * See {@link jdk.internal.org.objectweb.asm.ClassVisitor#visitModule(String, int)}.
+ *
+ * @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
+ */
+ public Printer visitModule(String name, int access, String version) {
+ throw new RuntimeException("Must be overriden");
+ }
+
+ /**
* Class outer class.
* See {@link jdk.internal.org.objectweb.asm.ClassVisitor#visitOuterClass}.
*
* Visits the enclosing class of the class. This method must be called only
* if the class has an enclosing class.
@@ -374,10 +392,49 @@
* Class end. See {@link jdk.internal.org.objectweb.asm.ClassVisitor#visitEnd}.
*/
public abstract void visitClassEnd();
// ------------------------------------------------------------------------
+ // Module
+ // ------------------------------------------------------------------------
+
+ public void visitMainClass(String mainClass) {
+ throw new RuntimeException("Must be overriden");
+ }
+
+ public void visitPackage(String packaze) {
+ throw new RuntimeException("Must be overriden");
+ }
+
+ public void visitRequire(String module, int access, String version) {
+ throw new RuntimeException("Must be overriden");
+ }
+
+ public void visitExport(String packaze, int access, String... modules) {
+ throw new RuntimeException("Must be overriden");
+ }
+
+ public void visitOpen(String packaze, int access, String... modules) {
+ throw new RuntimeException("Must be overriden");
+ }
+
+ public void visitUse(String service) {
+ throw new RuntimeException("Must be overriden");
+ }
+
+ public void visitProvide(String service, String... providers) {
+ throw new RuntimeException("Must be overriden");
+ }
+
+ /**
+ * Module end. See {@link jdk.internal.org.objectweb.asm.ModuleVisitor#visitEnd}.
+ */
+ public void visitModuleEnd() {
+ throw new RuntimeException("Must be overriden");
+ }
+
+ // ------------------------------------------------------------------------
// Annotations
// ------------------------------------------------------------------------
/**
* Annotation value.
< prev index next >