Commit cb7d8cfc authored by Eric Bruneton's avatar Eric Bruneton

Prepare for the next version, 7.0-beta.

parent 73d498fb
Pipeline #2791 passed with stage
in 7 minutes and 38 seconds
......@@ -72,7 +72,7 @@ public class BasicInterpreter extends Interpreter<BasicValue> implements Opcodes
*
* @param api the ASM API version supported by this interpreter. Must be one of {@link
* org.objectweb.asm.Opcodes#ASM4}, {@link org.objectweb.asm.Opcodes#ASM5}, {@link
* org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7_EXPERIMENTAL}.
* org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7}.
*/
protected BasicInterpreter(final int api) {
super(api);
......
......@@ -58,7 +58,7 @@ public class BasicVerifier extends BasicInterpreter {
*
* @param api the ASM API version supported by this interpreter. Must be one of {@link
* org.objectweb.asm.Opcodes#ASM4}, {@link org.objectweb.asm.Opcodes#ASM5}, {@link
* org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7_EXPERIMENTAL}.
* org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7}.
*/
protected BasicVerifier(final int api) {
super(api);
......
......@@ -47,7 +47,7 @@ public abstract class Interpreter<V extends Value> {
/**
* The ASM API version supported by this interpreter. The value of this field must be one of
* {@link org.objectweb.asm.Opcodes#ASM4}, {@link org.objectweb.asm.Opcodes#ASM5}, {@link
* org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7_EXPERIMENTAL}.
* org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7}.
*/
protected final int api;
......@@ -56,7 +56,7 @@ public abstract class Interpreter<V extends Value> {
*
* @param api the ASM API version supported by this interpreter. Must be one of {@link
* org.objectweb.asm.Opcodes#ASM4}, {@link org.objectweb.asm.Opcodes#ASM5}, {@link
* org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7_EXPERIMENTAL}.
* org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7}.
*/
protected Interpreter(final int api) {
this.api = api;
......
......@@ -105,7 +105,7 @@ public class SimpleVerifier extends BasicVerifier {
*
* @param api the ASM API version supported by this verifier. Must be one of {@link
* org.objectweb.asm.Opcodes#ASM4}, {@link org.objectweb.asm.Opcodes#ASM5}, {@link
* org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7_EXPERIMENTAL}.
* org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7}.
* @param currentClass the type of the class to be verified.
* @param currentSuperClass the type of the super class of the class to be verified.
* @param currentClassInterfaces the types of the interfaces directly implemented by the class to
......
......@@ -62,7 +62,7 @@ public class SourceInterpreter extends Interpreter<SourceValue> implements Opcod
*
* @param api the ASM API version supported by this interpreter. Must be one of {@link
* org.objectweb.asm.Opcodes#ASM4}, {@link org.objectweb.asm.Opcodes#ASM5}, {@link
* org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7_EXPERIMENTAL}.
* org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7}.
*/
protected SourceInterpreter(final int api) {
super(api);
......
......@@ -89,7 +89,7 @@ public class BasicInterpreterTest extends AsmTest {
for (MethodNode methodNode : classNode.methods) {
Analyzer<BasicValue> analyzer =
new Analyzer<BasicValue>(
new BasicInterpreter(Opcodes.ASM7_EXPERIMENTAL) {
new BasicInterpreter(Opcodes.ASM7) {
@Override
public BasicValue merge(final BasicValue value1, final BasicValue value2) {
return new BasicValue(super.merge(value1, value2).getType());
......
......@@ -497,8 +497,7 @@ public class SimpleVerifierTest extends AsmTest implements Opcodes {
Type baseType = Type.getObjectType("C");
Type superType = Type.getObjectType("D");
Type interfaceType = Type.getObjectType("I");
new SimpleVerifier(
ASM7_EXPERIMENTAL, baseType, superType, Arrays.asList(interfaceType), false) {
new SimpleVerifier(ASM7, baseType, superType, Arrays.asList(interfaceType), false) {
void test() {
assertTrue(isAssignableFrom(baseType, baseType));
......@@ -516,7 +515,7 @@ public class SimpleVerifierTest extends AsmTest implements Opcodes {
}
}.test();
new SimpleVerifier(ASM7_EXPERIMENTAL, interfaceType, null, null, true) {
new SimpleVerifier(ASM7, interfaceType, null, null, true) {
void test() {
assertTrue(isAssignableFrom(interfaceType, baseType));
......
......@@ -97,8 +97,7 @@ public abstract class AdviceAdapter extends GeneratorAdapter implements Opcodes
* Constructs a new {@link AdviceAdapter}.
*
* @param api the ASM API version implemented by this visitor. Must be one of {@link
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link
* Opcodes#ASM7_EXPERIMENTAL}.
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
* @param methodVisitor the method visitor to which this adapter delegates calls.
* @param access the method's access flags (see {@link Opcodes}).
* @param name the method's name.
......
......@@ -116,7 +116,7 @@ public class AnalyzerAdapter extends MethodVisitor {
final String name,
final String descriptor,
final MethodVisitor methodVisitor) {
this(Opcodes.ASM6, owner, access, name, descriptor, methodVisitor);
this(Opcodes.ASM7, owner, access, name, descriptor, methodVisitor);
if (getClass() != AnalyzerAdapter.class) {
throw new IllegalStateException();
}
......@@ -126,8 +126,7 @@ public class AnalyzerAdapter extends MethodVisitor {
* Constructs a new {@link AnalyzerAdapter}.
*
* @param api the ASM API version implemented by this visitor. Must be one of {@link
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link
* Opcodes#ASM7_EXPERIMENTAL}.
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
* @param owner the owner's class name.
* @param access the method's access flags (see {@link Opcodes}).
* @param name the method's name.
......
......@@ -49,7 +49,7 @@ public class AnnotationRemapper extends AnnotationVisitor {
* @param remapper the remapper to use to remap the types in the visited annotation.
*/
public AnnotationRemapper(final AnnotationVisitor annotationVisitor, final Remapper remapper) {
this(Opcodes.ASM6, annotationVisitor, remapper);
this(Opcodes.ASM7, annotationVisitor, remapper);
}
/**
......
......@@ -59,7 +59,7 @@ public class ClassRemapper extends ClassVisitor {
* @param remapper the remapper to use to remap the types in the visited class.
*/
public ClassRemapper(final ClassVisitor classVisitor, final Remapper remapper) {
this(Opcodes.ASM6, classVisitor, remapper);
this(Opcodes.ASM7, classVisitor, remapper);
}
/**
......@@ -67,7 +67,7 @@ public class ClassRemapper extends ClassVisitor {
*
* @param api the ASM API version supported by this remapper. Must be one of {@link
* org.objectweb.asm.Opcodes#ASM4}, {@link org.objectweb.asm.Opcodes#ASM5}, {@link
* org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7_EXPERIMENTAL}.
* org.objectweb.asm.Opcodes#ASM6} or {@link org.objectweb.asm.Opcodes#ASM7}.
* @param classVisitor the class visitor this remapper must deleted to.
* @param remapper the remapper to use to remap the types in the visited class.
*/
......@@ -181,13 +181,13 @@ public class ClassRemapper extends ClassVisitor {
}
@Override
public void visitNestHostExperimental(final String nestHost) {
super.visitNestHostExperimental(remapper.mapType(nestHost));
public void visitNestHost(final String nestHost) {
super.visitNestHost(remapper.mapType(nestHost));
}
@Override
public void visitNestMemberExperimental(final String nestMember) {
super.visitNestMemberExperimental(remapper.mapType(nestMember));
public void visitNestMember(final String nestMember) {
super.visitNestMember(remapper.mapType(nestMember));
}
/**
......
......@@ -47,7 +47,7 @@ public class CodeSizeEvaluator extends MethodVisitor implements Opcodes {
private int maxSize;
public CodeSizeEvaluator(final MethodVisitor methodVisitor) {
this(Opcodes.ASM6, methodVisitor);
this(Opcodes.ASM7, methodVisitor);
}
protected CodeSizeEvaluator(final int api, final MethodVisitor methodVisitor) {
......
......@@ -51,7 +51,7 @@ public class FieldRemapper extends FieldVisitor {
* @param remapper the remapper to use to remap the types in the visited field.
*/
public FieldRemapper(final FieldVisitor fieldVisitor, final Remapper remapper) {
this(Opcodes.ASM6, fieldVisitor, remapper);
this(Opcodes.ASM7, fieldVisitor, remapper);
}
/**
......
......@@ -201,7 +201,7 @@ public class GeneratorAdapter extends LocalVariablesSorter {
final int access,
final String name,
final String descriptor) {
this(Opcodes.ASM6, methodVisitor, access, name, descriptor);
this(Opcodes.ASM7, methodVisitor, access, name, descriptor);
if (getClass() != GeneratorAdapter.class) {
throw new IllegalStateException();
}
......@@ -211,8 +211,7 @@ public class GeneratorAdapter extends LocalVariablesSorter {
* Constructs a new {@link GeneratorAdapter}.
*
* @param api the ASM API version implemented by this visitor. Must be one of {@link
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link
* Opcodes#ASM7_EXPERIMENTAL}.
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
* @param methodVisitor the method visitor to which this adapter delegates calls.
* @param access the method's access flags (see {@link Opcodes}).
* @param name the method's name.
......
......@@ -53,7 +53,7 @@ public class InstructionAdapter extends MethodVisitor {
* @throws IllegalStateException If a subclass calls this constructor.
*/
public InstructionAdapter(final MethodVisitor methodVisitor) {
this(Opcodes.ASM6, methodVisitor);
this(Opcodes.ASM7, methodVisitor);
if (getClass() != InstructionAdapter.class) {
throw new IllegalStateException();
}
......@@ -63,8 +63,7 @@ public class InstructionAdapter extends MethodVisitor {
* Constructs a new {@link InstructionAdapter}.
*
* @param api the ASM API version implemented by this visitor. Must be one of {@link
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link
* Opcodes#ASM7_EXPERIMENTAL}.
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
* @param methodVisitor the method visitor to which this adapter delegates calls.
*/
protected InstructionAdapter(final int api, final MethodVisitor methodVisitor) {
......@@ -640,7 +639,7 @@ public class InstructionAdapter extends MethodVisitor {
|| (value instanceof Type && ((Type) value).getSort() == Type.METHOD))) {
throw new UnsupportedOperationException();
}
if (api != Opcodes.ASM7_EXPERIMENTAL && value instanceof ConstantDynamic) {
if (api != Opcodes.ASM7 && value instanceof ConstantDynamic) {
throw new UnsupportedOperationException();
}
if (value instanceof Integer) {
......
......@@ -97,7 +97,7 @@ public class JSRInlinerAdapter extends MethodNode implements Opcodes {
final String descriptor,
final String signature,
final String[] exceptions) {
this(Opcodes.ASM6, methodVisitor, access, name, descriptor, signature, exceptions);
this(Opcodes.ASM7, methodVisitor, access, name, descriptor, signature, exceptions);
if (getClass() != JSRInlinerAdapter.class) {
throw new IllegalStateException();
}
......@@ -107,8 +107,7 @@ public class JSRInlinerAdapter extends MethodNode implements Opcodes {
* Constructs a new {@link JSRInlinerAdapter}.
*
* @param api the ASM API version implemented by this visitor. Must be one of {@link
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link
* Opcodes#ASM7_EXPERIMENTAL}.
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
* @param methodVisitor the method visitor to send the resulting inlined method code to, or <code>
* null</code>.
* @param access the method's access flags (see {@link Opcodes}). This parameter also indicates if
......
......@@ -81,7 +81,7 @@ public class LocalVariablesSorter extends MethodVisitor {
*/
public LocalVariablesSorter(
final int access, final String descriptor, final MethodVisitor methodVisitor) {
this(Opcodes.ASM6, access, descriptor, methodVisitor);
this(Opcodes.ASM7, access, descriptor, methodVisitor);
if (getClass() != LocalVariablesSorter.class) {
throw new IllegalStateException();
}
......@@ -91,8 +91,7 @@ public class LocalVariablesSorter extends MethodVisitor {
* Constructs a new {@link LocalVariablesSorter}.
*
* @param api the ASM API version implemented by this visitor. Must be one of {@link
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link
* Opcodes#ASM7_EXPERIMENTAL}.
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
* @param access access flags of the adapted method.
* @param descriptor the method's descriptor (see {@link Type}).
* @param methodVisitor the method visitor to which this adapter delegates calls.
......
......@@ -53,7 +53,7 @@ public class MethodRemapper extends MethodVisitor {
* @param remapper the remapper to use to remap the types in the visited method.
*/
public MethodRemapper(final MethodVisitor methodVisitor, final Remapper remapper) {
this(Opcodes.ASM6, methodVisitor, remapper);
this(Opcodes.ASM7, methodVisitor, remapper);
}
/**
......
......@@ -49,7 +49,7 @@ public class ModuleRemapper extends ModuleVisitor {
* @param remapper the remapper to use to remap the types in the visited module.
*/
public ModuleRemapper(final ModuleVisitor moduleVisitor, final Remapper remapper) {
this(Opcodes.ASM6, moduleVisitor, remapper);
this(Opcodes.ASM7, moduleVisitor, remapper);
}
/**
......
......@@ -149,7 +149,7 @@ public class SerialVersionUIDAdder extends ClassVisitor {
* @throws IllegalStateException If a subclass calls this constructor.
*/
public SerialVersionUIDAdder(final ClassVisitor classVisitor) {
this(Opcodes.ASM6, classVisitor);
this(Opcodes.ASM7, classVisitor);
if (getClass() != SerialVersionUIDAdder.class) {
throw new IllegalStateException();
}
......@@ -159,8 +159,7 @@ public class SerialVersionUIDAdder extends ClassVisitor {
* Constructs a new {@link SerialVersionUIDAdder}.
*
* @param api the ASM API version implemented by this visitor. Must be one of {@link
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link
* Opcodes#ASM7_EXPERIMENTAL}.
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
* @param classVisitor a {@link ClassVisitor} to which this visitor will delegate calls.
*/
protected SerialVersionUIDAdder(final int api, final ClassVisitor classVisitor) {
......
......@@ -53,7 +53,7 @@ public class SignatureRemapper extends SignatureVisitor {
* @param remapper the remapper to use to remap the types in the visited signature.
*/
public SignatureRemapper(final SignatureVisitor signatureVisitor, final Remapper remapper) {
this(Opcodes.ASM6, signatureVisitor, remapper);
this(Opcodes.ASM7, signatureVisitor, remapper);
}
/**
......
......@@ -61,7 +61,7 @@ public class StaticInitMerger extends ClassVisitor {
* null.
*/
public StaticInitMerger(final String prefix, final ClassVisitor classVisitor) {
this(Opcodes.ASM6, prefix, classVisitor);
this(Opcodes.ASM7, prefix, classVisitor);
}
/**
......
......@@ -56,7 +56,7 @@ public class TryCatchBlockSorter extends MethodNode {
final String descriptor,
final String signature,
final String[] exceptions) {
this(Opcodes.ASM6, methodVisitor, access, name, descriptor, signature, exceptions);
this(Opcodes.ASM7, methodVisitor, access, name, descriptor, signature, exceptions);
if (getClass() != TryCatchBlockSorter.class) {
throw new IllegalStateException();
}
......
......@@ -395,7 +395,7 @@ public class AdviceAdapterTest extends AsmTest {
methodGenerator =
new MethodGenerator(
new AdviceAdapter(
Opcodes.ASM6, methodVisitor, Opcodes.ACC_PUBLIC, "<init>", descriptor) {
Opcodes.ASM7, methodVisitor, Opcodes.ACC_PUBLIC, "<init>", descriptor) {
@Override
protected void onMethodEnter() {
......@@ -423,7 +423,7 @@ public class AdviceAdapterTest extends AsmTest {
private final boolean expectedClass;
MethodGenerator(final MethodVisitor methodVisitor, final boolean expectedClass) {
super(Opcodes.ASM6, methodVisitor);
super(Opcodes.ASM7, methodVisitor);
this.expectedClass = expectedClass;
}
......
......@@ -150,7 +150,7 @@ public class AnalyzerAdapterTest extends AsmTest {
private boolean hasOriginalFrame;
AnalyzedFramesInserter(final MethodVisitor methodVisitor) {
super(Opcodes.ASM7_EXPERIMENTAL, methodVisitor);
super(Opcodes.ASM7, methodVisitor);
}
void setAnalyzerAdapter(final AnalyzerAdapter analyzerAdapter) {
......
......@@ -811,11 +811,7 @@ public class GeneratorAdapterTest {
textifier = new Textifier();
generatorAdapter =
new GeneratorAdapter(
Opcodes.ASM7_EXPERIMENTAL,
new TraceMethodVisitor(textifier),
access,
name,
descriptor);
Opcodes.ASM7, new TraceMethodVisitor(textifier), access, name, descriptor);
}
public String push(final boolean value) {
......
......@@ -140,7 +140,7 @@ public class LocalVariablesSorterTest extends AsmTest {
new ClassReader(new FileInputStream("src/test/resources/Issue317586.class"));
ClassWriter classWriter = new ClassWriter(0);
ClassVisitor classVisitor =
new ClassVisitor(Opcodes.ASM7_EXPERIMENTAL, classWriter) {
new ClassVisitor(Opcodes.ASM7, classWriter) {
@Override
public MethodVisitor visitMethod(
final int access,
......
......@@ -60,7 +60,7 @@ public class ModuleHashesAttributeTest {
ModuleHashesAttribute moduleHashesAttribute = new ModuleHashesAttribute();
new ClassReader(classWriter.toByteArray())
.accept(
new ClassVisitor(Opcodes.ASM6) {
new ClassVisitor(Opcodes.ASM7) {
@Override
public void visitAttribute(final Attribute attribute) {
......
......@@ -51,7 +51,7 @@ public class ModuleResolutionAttributeTest {
ModuleResolutionAttribute moduleResolutionAttribute = new ModuleResolutionAttribute();
new ClassReader(classWriter.toByteArray())
.accept(
new ClassVisitor(Opcodes.ASM6) {
new ClassVisitor(Opcodes.ASM7) {
@Override
public void visitAttribute(final Attribute attribute) {
......
......@@ -51,7 +51,7 @@ public class ModuleTargetAttributeTest {
ModuleTargetAttribute moduleTargetAttribute = new ModuleTargetAttribute();
new ClassReader(classWriter.toByteArray())
.accept(
new ClassVisitor(Opcodes.ASM6) {
new ClassVisitor(Opcodes.ASM7) {
@Override
public void visitAttribute(final Attribute attribute) {
......
......@@ -51,7 +51,7 @@ public class SerialVersionUIDAdderTest extends AsmTest {
long[] svuid = new long[1];
new ClassReader(className)
.accept(
new SerialVersionUIDAdder(Opcodes.ASM6, null) {
new SerialVersionUIDAdder(Opcodes.ASM7, null) {
@Override
protected long computeSVUID() throws IOException {
svuid[0] = super.computeSVUID();
......@@ -109,7 +109,7 @@ public class SerialVersionUIDAdderTest extends AsmTest {
final PrecompiledClass classParameter, final Api apiParameter) {
ClassReader classReader = new ClassReader(classParameter.getBytes());
ClassWriter classWriter = new ClassWriter(0);
classReader.accept(new SerialVersionUIDAdder(Opcodes.ASM7_EXPERIMENTAL, classWriter) {}, 0);
classReader.accept(new SerialVersionUIDAdder(classWriter), 0);
if ((classReader.getAccess() & Opcodes.ACC_ENUM) == 0) {
assertThatClass(classWriter.toByteArray()).contains("serialVersionUID");
}
......
......@@ -60,7 +60,7 @@ public class AnnotationNode extends AnnotationVisitor {
* @throws IllegalStateException If a subclass calls this constructor.
*/
public AnnotationNode(final String descriptor) {
this(Opcodes.ASM6, descriptor);
this(Opcodes.ASM7, descriptor);
if (getClass() != AnnotationNode.class) {
throw new IllegalStateException();
}
......@@ -70,8 +70,7 @@ public class AnnotationNode extends AnnotationVisitor {
* Constructs a new {@link AnnotationNode}.
*
* @param api the ASM API version implemented by this visitor. Must be one of {@link
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link
* Opcodes#ASM7_EXPERIMENTAL}.
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
* @param descriptor the class descriptor of the annotation class.
*/
public AnnotationNode(final int api, final String descriptor) {
......@@ -85,7 +84,7 @@ public class AnnotationNode extends AnnotationVisitor {
* @param values where the visited values must be stored.
*/
AnnotationNode(final List<Object> values) {
super(Opcodes.ASM6);
super(Opcodes.ASM7);
this.values = values;
}
......@@ -174,7 +173,7 @@ public class AnnotationNode extends AnnotationVisitor {
* introduced in more recent versions of the ASM API than the given version.
*
* @param api an ASM API version. Must be one of {@link Opcodes#ASM4}, {@link Opcodes#ASM5},
* {@link Opcodes#ASM6} or {@link Opcodes#ASM7_EXPERIMENTAL}.
* {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
*/
public void check(final int api) {
// nothing to do
......
......@@ -120,19 +120,11 @@ public class ClassNode extends ClassVisitor {
/** The inner classes of this class. */
public List<InnerClassNode> innerClasses;
/**
* <b>Experimental, use at your own risk. This field will be renamed when it becomes stable, this
* will break existing code using it</b>. The internal name of the nest host class of this class.
* May be {@literal null}.
*/
public String nestHostClassExperimental;
/** The internal name of the nest host class of this class. May be {@literal null}. */
public String nestHostClass;
/**
* <b>Experimental, use at your own risk. This field will be renamed when it becomes stable, this
* will break existing code using it</b>. The internal names of the nest members of this class.
* May be {@literal null}.
*/
public List<String> nestMembersExperimental;
/** The internal names of the nest members of this class. May be {@literal null}. */
public List<String> nestMembers;
/** The fields of this class. */
public List<FieldNode> fields;
......@@ -147,7 +139,7 @@ public class ClassNode extends ClassVisitor {
* @throws IllegalStateException If a subclass calls this constructor.
*/
public ClassNode() {
this(Opcodes.ASM6);
this(Opcodes.ASM7);
if (getClass() != ClassNode.class) {
throw new IllegalStateException();
}
......@@ -157,8 +149,7 @@ public class ClassNode extends ClassVisitor {
* Constructs a new {@link ClassNode}.
*
* @param api the ASM API version implemented by this visitor. Must be one of {@link
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link
* Opcodes#ASM7_EXPERIMENTAL}.
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
*/
public ClassNode(final int api) {
super(api);
......@@ -201,8 +192,8 @@ public class ClassNode extends ClassVisitor {
}
@Override
public void visitNestHostExperimental(final String nestHost) {
this.nestHostClassExperimental = nestHost;
public void visitNestHost(final String nestHost) {
this.nestHostClass = nestHost;
}
@Override
......@@ -256,11 +247,11 @@ public class ClassNode extends ClassVisitor {
}
@Override
public void visitNestMemberExperimental(final String nestMember) {
if (nestMembersExperimental == null) {
nestMembersExperimental = new ArrayList<String>();
public void visitNestMember(final String nestMember) {
if (nestMembers == null) {
nestMembers = new ArrayList<String>();
}
nestMembersExperimental.add(nestMember);
nestMembers.add(nestMember);
}
@Override
......@@ -309,11 +300,10 @@ public class ClassNode extends ClassVisitor {
* in more recent versions of the ASM API than the given version.
*
* @param api an ASM API version. Must be one of {@link Opcodes#ASM4}, {@link Opcodes#ASM5},
* {@link Opcodes#ASM6} or {@link Opcodes#ASM7_EXPERIMENTAL}.
* {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
*/
public void check(final int api) {
if (api < Opcodes.ASM7_EXPERIMENTAL
&& (nestHostClassExperimental != null || nestMembersExperimental != null)) {
if (api < Opcodes.ASM7 && (nestHostClass != null || nestMembers != null)) {
throw new UnsupportedClassVersionException();
}
if (api < Opcodes.ASM6 && module != null) {
......@@ -375,8 +365,8 @@ public class ClassNode extends ClassVisitor {
module.accept(classVisitor);
}
// Visit the nest host class.
if (nestHostClassExperimental != null) {
classVisitor.visitNestHostExperimental(nestHostClassExperimental);
if (nestHostClass != null) {
classVisitor.visitNestHost(nestHostClass);
}
// Visit the outer class.
if (outerClass != null) {
......@@ -418,9 +408,9 @@ public class ClassNode extends ClassVisitor {
}
}
// Visit the nest members.
if (nestMembersExperimental != null) {
for (int i = 0, n = nestMembersExperimental.size(); i < n; ++i) {
classVisitor.visitNestMemberExperimental(nestMembersExperimental.get(i));
if (nestMembers != null) {
for (int i = 0, n = nestMembers.size(); i < n; ++i) {
classVisitor.visitNestMember(nestMembers.get(i));
}
}
// Visit the inner classes.
......
......@@ -100,7 +100,7 @@ public class FieldNode extends FieldVisitor {
final String descriptor,
final String signature,
final Object value) {
this(Opcodes.ASM6, access, name, descriptor, signature, value);
this(Opcodes.ASM7, access, name, descriptor, signature, value);
if (getClass() != FieldNode.class) {
throw new IllegalStateException();
}
......@@ -197,7 +197,7 @@ public class FieldNode extends FieldVisitor {
* in more recent versions of the ASM API than the given version.
*
* @param api an ASM API version. Must be one of {@link Opcodes#ASM4}, {@link Opcodes#ASM5},
* {@link Opcodes#ASM6} or {@link Opcodes#ASM7_EXPERIMENTAL}.
* {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
*/
public void check(final int api) {
if (api == Opcodes.ASM4) {
......
......@@ -84,15 +84,14 @@ public class LocalVariableAnnotationNode extends TypeAnnotationNode {
final LabelNode[] end,
final int[] index,
final String descriptor) {
this(Opcodes.ASM6, typeRef, typePath, start, end, index, descriptor);
this(Opcodes.ASM7, typeRef, typePath, start, end, index, descriptor);
}
/**
* Constructs a new {@link LocalVariableAnnotationNode}.
*
* @param api the ASM API version implemented by this visitor. Must be one of {@link
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link
* Opcodes#ASM7_EXPERIMENTAL}.
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
* @param typeRef a reference to the annotated type. See {@link org.objectweb.asm.TypeReference}.
* @param start the fist instructions corresponding to the continuous ranges that make the scope
* of this local variable (inclusive).
......
......@@ -155,7 +155,7 @@ public class MethodNode extends MethodVisitor {
* @throws IllegalStateException If a subclass calls this constructor.
*/
public MethodNode() {
this(Opcodes.ASM6);
this(Opcodes.ASM7);
if (getClass() != MethodNode.class) {
throw new IllegalStateException();
}
......@@ -165,8 +165,7 @@ public class MethodNode extends MethodVisitor {
* Constructs an uninitialized {@link MethodNode}.
*
* @param api the ASM API version implemented by this visitor. Must be one of {@link
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link
* Opcodes#ASM7_EXPERIMENTAL}.
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
*/
public MethodNode(final int api) {
super(api);
......@@ -192,7 +191,7 @@ public class MethodNode extends MethodVisitor {
final String descriptor,
final String signature,
final String[] exceptions) {
this(Opcodes.ASM6, access, name, descriptor, signature, exceptions);
this(Opcodes.ASM7, access, name, descriptor, signature, exceptions);
if (getClass() != MethodNode.class) {
throw new IllegalStateException();
}
......@@ -202,8 +201,7 @@ public class MethodNode extends MethodVisitor {
* Constructs a new {@link MethodNode}.
*
* @param api the ASM API version implemented by this visitor. Must be one of {@link
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link
* Opcodes#ASM7_EXPERIMENTAL}.
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
* @param access the method's access flags (see {@link Opcodes}). This parameter also indicates if
* the method is synthetic and/or deprecated.
* @param name the method's name.
......@@ -606,7 +604,7 @@ public class MethodNode extends MethodVisitor {
* in more recent versions of the ASM API than the given version.
*
* @param api an ASM API version. Must be one of {@link Opcodes#ASM4}, {@link Opcodes#ASM5},
* {@link Opcodes#ASM6} or {@link Opcodes#ASM7_EXPERIMENTAL}.