Bug 562895 - Upgrade PDE code base to use Opcodes.ASM8 (

Change-Id: Ib965f2e03b3192711584e041afc8c839dc2a5e82
Signed-off-by: Vikas Chandra <Vikas.Chandra@in.ibm.com>
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/ReferenceExtractor.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/ReferenceExtractor.java
index e6d64cf..e726b47 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/ReferenceExtractor.java
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/ReferenceExtractor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2019 IBM Corporation and others.
+ * Copyright (c) 2007, 2020 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -82,7 +82,7 @@
 		protected List<Reference> references;
 
 		public ClassFileSignatureVisitor() {
-			super(Opcodes.ASM7);
+			super(Util.LATEST_OPCODES_ASM);
 			this.references = new ArrayList<>();
 		}
 
@@ -250,7 +250,7 @@
 		 * @param mv
 		 */
 		public ClassFileMethodVisitor(MethodVisitor mv, String name, int argumentcount) {
-			super(Opcodes.ASM7, mv);
+			super(Util.LATEST_OPCODES_ASM, mv);
 			this.argumentcount = argumentcount;
 			this.linePositionTracker = new LinePositionTracker();
 			this.lastLineNumber = -1;
@@ -635,7 +635,7 @@
 	class ClassFileFieldVisitor extends FieldVisitor {
 
 		ClassFileFieldVisitor() {
-			super(Opcodes.ASM7);
+			super(Util.LATEST_OPCODES_ASM);
 		}
 
 		@Override
@@ -991,7 +991,7 @@
 	 *            {@link ReferenceModifiers}
 	 */
 	public ReferenceExtractor(IApiType type, Set<Reference> collector, int referenceKinds) {
-		super(Opcodes.ASM7, new ClassNode());
+		super(Util.LATEST_OPCODES_ASM, new ClassNode());
 		fType = type;
 		this.collector = collector;
 		fReferenceKinds = referenceKinds;
@@ -1008,7 +1008,7 @@
 	 * @param tracker
 	 */
 	protected ReferenceExtractor(IApiType type, Set<Reference> collector, int referenceKinds, FieldTracker tracker) {
-		super(Opcodes.ASM7, new ClassNode());
+		super(Util.LATEST_OPCODES_ASM, new ClassNode());
 		fType = type;
 		this.collector = collector;
 		fReferenceKinds = referenceKinds;
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/SignatureDecoder.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/SignatureDecoder.java
index e6e3860..91f43df 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/SignatureDecoder.java
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/comparator/SignatureDecoder.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2018 IBM Corporation and others.
+ * Copyright (c) 2007, 2020 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -13,7 +13,7 @@
  *******************************************************************************/
 package org.eclipse.pde.api.tools.internal.comparator;
 
-import org.objectweb.asm.Opcodes;
+import org.eclipse.pde.api.tools.internal.util.Util;
 import org.objectweb.asm.signature.SignatureVisitor;
 
 /**
@@ -32,7 +32,7 @@
 	SignatureDescriptor signatureDescriptor;
 
 	public SignatureDecoder(SignatureDescriptor signatureDescriptor) {
-		super(Opcodes.ASM7);
+		super(Util.LATEST_OPCODES_ASM);
 		this.signatureDescriptor = signatureDescriptor;
 	}
 
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/TypeStructureBuilder.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/TypeStructureBuilder.java
index 9d80ffb..4bfe41b 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/TypeStructureBuilder.java
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/TypeStructureBuilder.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2018 IBM Corporation and others.
+ * Copyright (c) 2007, 2020 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -30,6 +30,7 @@
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiType;
 import org.eclipse.pde.api.tools.internal.provisional.model.IApiTypeRoot;
+import org.eclipse.pde.api.tools.internal.util.Util;
 import org.objectweb.asm.AnnotationVisitor;
 import org.objectweb.asm.ClassReader;
 import org.objectweb.asm.ClassVisitor;
@@ -57,7 +58,7 @@
 	 *            unknown
 	 */
 	TypeStructureBuilder(ClassVisitor cv, IApiComponent component, IApiTypeRoot file) {
-		super(Opcodes.ASM7, cv);
+		super(Util.LATEST_OPCODES_ASM, cv);
 		fComponent = component;
 		fFile = file;
 	}
@@ -154,7 +155,7 @@
 			}
 		}
 		final ApiMethod method = fType.addMethod(name, desc, signature, laccess, names);
-		return new MethodVisitor(Opcodes.ASM7,
+		return new MethodVisitor(Util.LATEST_OPCODES_ASM,
 				super.visitMethod(laccess, name, desc, signature, exceptions)) {
 			@Override
 			public AnnotationVisitor visitAnnotation(String sig, boolean visible) {
@@ -190,7 +191,7 @@
 		int traceCount = 0;
 
 		public AnnotationDefaultVisitor(ApiMethod method) {
-			super(Opcodes.ASM7);
+			super(Util.LATEST_OPCODES_ASM);
 			this.method = method;
 		}
 
@@ -306,7 +307,7 @@
 		String typeName;
 
 		public EnclosingMethodSetter(ClassVisitor cv, String typeName) {
-			super(Opcodes.ASM7, cv);
+			super(Util.LATEST_OPCODES_ASM, cv);
 			this.typeName = typeName.replace('.', '/');
 		}
 
@@ -339,7 +340,7 @@
 		protected EnclosingMethodSetter setter;
 
 		public TypeNameFinder(MethodVisitor mv, EnclosingMethodSetter enclosingMethodSetter) {
-			super(Opcodes.ASM7, mv);
+			super(Util.LATEST_OPCODES_ASM, mv);
 			this.setter = enclosingMethodSetter;
 		}
 
diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/Util.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/Util.java
index 43b5646..3b7c7fa 100644
--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/Util.java
+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/util/Util.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2018 IBM Corporation and others.
+ * Copyright (c) 2007, 2020 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -319,6 +319,8 @@
 
 	public static final String ORG_ECLIPSE_SWT = "org.eclipse.swt"; //$NON-NLS-1$
 
+	public static final int LATEST_OPCODES_ASM = Opcodes.ASM8;
+
 	/**
 	 * Throws an exception with the given message and underlying exception.
 	 *