aboutsummaryrefslogtreecommitdiffstats
path: root/bcel-builder
diff options
context:
space:
mode:
authorAndy Clement <aclement@pivotal.io>2019-11-25 10:40:44 -0800
committerAndy Clement <aclement@pivotal.io>2019-11-25 10:40:44 -0800
commit2704db20ecca12d3bbe514a4f7b84d297937de86 (patch)
tree2938cb6c560d2ea220272af703452ccd096702ca /bcel-builder
parent41c7347b064093b531b04004d42665582ba0fff0 (diff)
downloadaspectj-2704db20ecca12d3bbe514a4f7b84d297937de86.tar.gz
aspectj-2704db20ecca12d3bbe514a4f7b84d297937de86.zip
Java 13 support
Diffstat (limited to 'bcel-builder')
-rw-r--r--bcel-builder/src/main/java/org/aspectj/apache/bcel/Constants.java22
-rw-r--r--bcel-builder/src/main/java/org/aspectj/apache/bcel/util/ClassPath.java28
2 files changed, 27 insertions, 23 deletions
diff --git a/bcel-builder/src/main/java/org/aspectj/apache/bcel/Constants.java b/bcel-builder/src/main/java/org/aspectj/apache/bcel/Constants.java
index c0c0930b0..f80cc0f82 100644
--- a/bcel-builder/src/main/java/org/aspectj/apache/bcel/Constants.java
+++ b/bcel-builder/src/main/java/org/aspectj/apache/bcel/Constants.java
@@ -58,7 +58,7 @@ import org.aspectj.apache.bcel.generic.Type;
/**
* Constants for the project, mostly defined in the JVM specification.
- *
+ *
* @author <A HREF="mailto:markus.dahm@berlin.de">M. Dahm</A>
* @author Andy Clement
*/
@@ -88,9 +88,11 @@ public interface Constants {
public final static short MINOR_11 = 0;
public final static short MAJOR_12 = 56;
public final static short MINOR_12 = 0;
-
+ public final static short MAJOR_13 = 57;
+ public final static short MINOR_13 = 0;
+
public final static int PREVIEW_MINOR_VERSION = 65535;
-
+
// Defaults
public final static short MAJOR = MAJOR_1_1;
public final static short MINOR = MINOR_1_1;
@@ -138,7 +140,7 @@ public interface Constants {
// Indicates that this dependence was implicitly declared in the source of
// the module declaration
public final static int MODULE_ACC_MANDATED = 0x8000;
-
+
// Applies to classes compiled by new compilers only
public final static short ACC_SUPER = 0x0020;
@@ -159,15 +161,15 @@ public interface Constants {
public final static byte CONSTANT_Methodref = 10;
public final static byte CONSTANT_InterfaceMethodref = 11;
public final static byte CONSTANT_NameAndType = 12;
-
+
public final static byte CONSTANT_MethodHandle = 15;
public final static byte CONSTANT_MethodType = 16;
public final static byte CONSTANT_Dynamic = 17;
public final static byte CONSTANT_InvokeDynamic = 18;
-
+
public final static byte CONSTANT_Module = 19;
public final static byte CONSTANT_Package = 20;
-
+
public final static String[] CONSTANT_NAMES = { "", "CONSTANT_Utf8", "", "CONSTANT_Integer", "CONSTANT_Float", "CONSTANT_Long",
"CONSTANT_Double", "CONSTANT_Class", "CONSTANT_String", "CONSTANT_Fieldref", "CONSTANT_Methodref",
@@ -651,7 +653,7 @@ public interface Constants {
public static final byte ATTR_RUNTIME_VISIBLE_TYPE_ANNOTATIONS = 20;
public static final byte ATTR_RUNTIME_INVISIBLE_TYPE_ANNOTATIONS = 21;
public static final byte ATTR_METHOD_PARAMETERS = 22;
-
+
// J9:
public static final byte ATTR_MODULE = 23;
public static final byte ATTR_MODULE_PACKAGES = 24;
@@ -663,11 +665,11 @@ public interface Constants {
public static final short KNOWN_ATTRIBUTES = 28;
- public static final String[] ATTRIBUTE_NAMES = {
+ public static final String[] ATTRIBUTE_NAMES = {
"SourceFile", "ConstantValue", "Code", "Exceptions", "LineNumberTable", "LocalVariableTable",
"InnerClasses", "Synthetic", "Deprecated", "PMGClass", "Signature", "StackMap",
"RuntimeVisibleAnnotations", "RuntimeInvisibleAnnotations", "RuntimeVisibleParameterAnnotations",
- "RuntimeInvisibleParameterAnnotations", "LocalVariableTypeTable", "EnclosingMethod",
+ "RuntimeInvisibleParameterAnnotations", "LocalVariableTypeTable", "EnclosingMethod",
"AnnotationDefault","BootstrapMethods", "RuntimeVisibleTypeAnnotations", "RuntimeInvisibleTypeAnnotations",
"MethodParameters", "Module", "ModulePackages", "ModuleMainClass", "NestHost", "NestMembers"
};
diff --git a/bcel-builder/src/main/java/org/aspectj/apache/bcel/util/ClassPath.java b/bcel-builder/src/main/java/org/aspectj/apache/bcel/util/ClassPath.java
index 9d15e81f4..2797df3cc 100644
--- a/bcel-builder/src/main/java/org/aspectj/apache/bcel/util/ClassPath.java
+++ b/bcel-builder/src/main/java/org/aspectj/apache/bcel/util/ClassPath.java
@@ -137,7 +137,7 @@ public class ClassPath implements Serializable {
/**
* Search for classes in CLASSPATH.
- *
+ *
* @deprecated Use SYSTEM_CLASS_PATH constant
*/
@Deprecated
@@ -225,11 +225,13 @@ public class ClassPath implements Serializable {
buf.append(File.pathSeparatorChar);
}
- // On Java9 the sun.boot.class.path won't be set. System classes accessible through JRT filesystem
+ // On Java9 the sun.boot.class.path won't be set. System classes accessible through JRT filesystem
if (vm_version.startsWith("9") || vm_version.startsWith("10")
- || vm_version.startsWith("11") || vm_version.startsWith("12")) {
+ || vm_version.startsWith("11")
+ || vm_version.startsWith("12")
+ || vm_version.startsWith("13")) {
buf.insert(0, File.pathSeparatorChar);
- buf.insert(0, System.getProperty("java.home") + File.separator + "lib" + File.separator + JRT_FS);
+ buf.insert(0, System.getProperty("java.home") + File.separator + "lib" + File.separator + JRT_FS);
}
return buf.toString().intern();
@@ -436,7 +438,7 @@ public class ClassPath implements Serializable {
return dir;
}
}
-
+
private static class JImage extends PathEntry {
private static URI JRT_URI = URI.create("jrt:/"); //$NON-NLS-1$
@@ -444,8 +446,8 @@ public class ClassPath implements Serializable {
private static String JAVA_BASE_PATH = "java.base"; //$NON-NLS-1$
private java.nio.file.FileSystem fs;
- private final Map<String, Path> fileMap;
-
+ private final Map<String, Path> fileMap;
+
JImage() {
fs = FileSystems.getFileSystem(JRT_URI);
fileMap = buildFileMap();
@@ -476,7 +478,7 @@ public class ClassPath implements Serializable {
}
return fileMap;
}
-
+
private static class ByteBasedClassFile implements ClassFile {
private byte[] bytes;
@@ -485,15 +487,15 @@ public class ClassPath implements Serializable {
private String base;
private long time;
private long size;
-
+
public ByteBasedClassFile(byte[] bytes, String path, String base, long time, long size) {
- this.bytes = bytes;
+ this.bytes = bytes;
this.path = path;
this.base = base;
this.time = time;
this.size = size;
}
-
+
@Override
public InputStream getInputStream() throws IOException {
// TODO too costly to keep these in inflated form in memory?
@@ -520,9 +522,9 @@ public class ClassPath implements Serializable {
public long getSize() {
return this.size;
}
-
+
}
-
+
@Override
ClassFile getClassFile(String name, String suffix) throws IOException {
// Class files are in here under names like this: