aboutsummaryrefslogtreecommitdiff
path: root/java/com/google/turbine/binder/CtSymClassBinder.java
diff options
context:
space:
mode:
authorcushon <cushon@google.com>2018-01-22 14:27:08 -0800
committerLiam Miller-Cushon <cushon@google.com>2018-01-22 23:50:20 -0800
commit0536e276b270954d6ef84886b7e931994424b599 (patch)
tree3524b2d5fee51fe8515d51eb3158dec3b78b3b9a /java/com/google/turbine/binder/CtSymClassBinder.java
parentff321b33efe50c0c2e9ada14c2a3ac07c0c240d4 (diff)
downloadturbine-0536e276b270954d6ef84886b7e931994424b599.tar.gz
Initial end-to-end support for module-infos
MOE_MIGRATED_REVID=182836497
Diffstat (limited to 'java/com/google/turbine/binder/CtSymClassBinder.java')
-rw-r--r--java/com/google/turbine/binder/CtSymClassBinder.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/java/com/google/turbine/binder/CtSymClassBinder.java b/java/com/google/turbine/binder/CtSymClassBinder.java
index 1252886..0d71b8d 100644
--- a/java/com/google/turbine/binder/CtSymClassBinder.java
+++ b/java/com/google/turbine/binder/CtSymClassBinder.java
@@ -19,12 +19,14 @@ package com.google.turbine.binder;
import com.google.common.base.Supplier;
import com.google.common.base.Suppliers;
import com.google.common.collect.ImmutableMap;
+import com.google.turbine.binder.bound.ModuleInfo;
import com.google.turbine.binder.bytecode.BytecodeBoundClass;
import com.google.turbine.binder.env.Env;
import com.google.turbine.binder.env.SimpleEnv;
import com.google.turbine.binder.lookup.SimpleTopLevelIndex;
import com.google.turbine.binder.lookup.TopLevelIndex;
import com.google.turbine.binder.sym.ClassSymbol;
+import com.google.turbine.binder.sym.ModuleSymbol;
import com.google.turbine.zip.Zip;
import java.io.IOException;
import java.nio.file.Files;
@@ -79,6 +81,8 @@ public class CtSymClassBinder {
return null;
}
SimpleEnv<ClassSymbol, BytecodeBoundClass> env = new SimpleEnv<>(ImmutableMap.copyOf(map));
+ // TODO(cushon): support ct.sym module-infos once they exist (JDK 10?)
+ Env<ModuleSymbol, ModuleInfo> moduleEnv = new SimpleEnv<>(ImmutableMap.of());
TopLevelIndex index = SimpleTopLevelIndex.of(env.asMap().keySet());
return new ClassPath() {
@Override
@@ -87,6 +91,11 @@ public class CtSymClassBinder {
}
@Override
+ public Env<ModuleSymbol, ModuleInfo> moduleEnv() {
+ return moduleEnv;
+ }
+
+ @Override
public TopLevelIndex index() {
return index;
}