Home
last modified time | relevance | path

Searched refs:ClassSymbol (Results 1 – 25 of 73) sorted by relevance

123

/external/turbine/java/com/google/turbine/binder/sym/
DClassSymbol.java30 public class ClassSymbol implements Symbol { class
32 public static final ClassSymbol OBJECT = new ClassSymbol("java/lang/Object");
33 public static final ClassSymbol STRING = new ClassSymbol("java/lang/String");
34 public static final ClassSymbol ENUM = new ClassSymbol("java/lang/Enum");
35 public static final ClassSymbol ANNOTATION = new ClassSymbol("java/lang/annotation/Annotation");
36 public static final ClassSymbol INHERITED = new ClassSymbol("java/lang/annotation/Inherited");
37 public static final ClassSymbol CLONEABLE = new ClassSymbol("java/lang/Cloneable");
38 public static final ClassSymbol SERIALIZABLE = new ClassSymbol("java/io/Serializable");
39 public static final ClassSymbol DEPRECATED = new ClassSymbol("java/lang/Deprecated");
40 public static final ClassSymbol PROFILE_ANNOTATION = new ClassSymbol("jdk/Profile+Annotation");
[all …]
/external/turbine/java/com/google/turbine/binder/
DResolve.java28 import com.google.turbine.binder.sym.ClassSymbol;
43 public static ClassSymbol resolve( in resolve()
44 Env<ClassSymbol, ? extends HeaderBoundClass> env, in resolve() argument
45 ClassSymbol origin, in resolve()
46 ClassSymbol sym, in resolve()
51 private static ClassSymbol resolve( in resolve()
52 Env<ClassSymbol, ? extends HeaderBoundClass> env, in resolve() argument
53 ClassSymbol origin, in resolve()
54 ClassSymbol sym, in resolve()
56 Set<ClassSymbol> seen) { in resolve()
[all …]
DBinder.java53 import com.google.turbine.binder.sym.ClassSymbol;
118 SimpleEnv<ClassSymbol, SourceBoundClass> ienv = bindSourceBoundClasses(preProcessedUnits); in bind()
120 ImmutableSet<ClassSymbol> syms = ienv.asMap().keySet(); in bind()
128 CompoundEnv<ClassSymbol, BytecodeBoundClass> classPathEnv = in bind()
137 SimpleEnv<ClassSymbol, PackageSourceBoundClass> psenv = bindPackagesResult.classes; in bind()
140 Env<ClassSymbol, SourceHeaderBoundClass> henv = bindHierarchy(log, syms, psenv, classPathEnv); in bind()
142 Env<ClassSymbol, SourceTypeBoundClass> tenv = in bind()
147 CompoundEnv.<ClassSymbol, HeaderBoundClass>of(classPathEnv).append(henv)); in bind()
153 CompoundEnv.<ClassSymbol, TypeBoundClass>of(classPathEnv).append(tenv), in bind()
157 syms, tenv, CompoundEnv.<ClassSymbol, TypeBoundClass>of(classPathEnv).append(tenv)); in bind()
[all …]
DHierarchyBinder.java29 import com.google.turbine.binder.sym.ClassSymbol;
44 ClassSymbol origin, in bind()
46 Env<ClassSymbol, ? extends HeaderBoundClass> env) { in bind() argument
51 private final ClassSymbol origin;
53 private final Env<ClassSymbol, ? extends HeaderBoundClass> env;
57 ClassSymbol origin, in HierarchyBinder()
59 Env<ClassSymbol, ? extends HeaderBoundClass> env) { in HierarchyBinder() argument
69 ClassSymbol superclass; in bind()
78 superclass = ClassSymbol.ENUM; in bind()
83 superclass = !origin.equals(ClassSymbol.OBJECT) ? ClassSymbol.OBJECT : null; in bind()
[all …]
DClassPathBinder.java30 import com.google.turbine.binder.sym.ClassSymbol;
53 Map<ClassSymbol, BytecodeBoundClass> transitive = new LinkedHashMap<>(); in bindClasspath()
54 Map<ClassSymbol, BytecodeBoundClass> map = new HashMap<>(); in bindClasspath()
57 Env<ClassSymbol, BytecodeBoundClass> benv = in bindClasspath()
58 new Env<ClassSymbol, BytecodeBoundClass>() { in bindClasspath()
60 public BytecodeBoundClass get(ClassSymbol sym) { in bindClasspath()
71 for (Map.Entry<ClassSymbol, BytecodeBoundClass> entry : transitive.entrySet()) { in bindClasspath()
72 ClassSymbol symbol = entry.getKey(); in bindClasspath()
75 SimpleEnv<ClassSymbol, BytecodeBoundClass> env = new SimpleEnv<>(ImmutableMap.copyOf(map)); in bindClasspath()
80 public Env<ClassSymbol, BytecodeBoundClass> env() { in bindClasspath()
[all …]
DProcessing.java38 import com.google.turbine.binder.sym.ClassSymbol;
111 Env<ClassSymbol, SourceTypeBoundClass> tenv = new SimpleEnv<>(result.units()); in process()
112 CompoundEnv<ClassSymbol, TypeBoundClass> env = in process()
113 CompoundEnv.<ClassSymbol, TypeBoundClass>of(result.classPathEnv()).append(tenv); in process()
148 Set<ClassSymbol> allSymbols = new HashSet<>(); in process()
158 ImmutableSet<ClassSymbol> syms = in process()
164 ImmutableSetMultimap<ClassSymbol, Symbol> allAnnotations = getAllAnnotations(env, syms); in process()
170 for (ClassSymbol a : allAnnotations.keys()) { in process()
213 env = CompoundEnv.<ClassSymbol, TypeBoundClass>of(result.classPathEnv()).append(tenv); in process()
280 private static ImmutableSetMultimap<ClassSymbol, Symbol> getAllAnnotations( in getAllAnnotations()
[all …]
/external/turbine/javatests/com/google/turbine/binder/
DBinderTest.java29 import com.google.turbine.binder.sym.ClassSymbol;
72 ImmutableMap<ClassSymbol, SourceTypeBoundClass> bound = in hello()
82 new ClassSymbol("a/A"), in hello()
83 new ClassSymbol("a/A$Inner1"), in hello()
84 new ClassSymbol("a/A$Inner2"), in hello()
85 new ClassSymbol("b/B")); in hello()
87 SourceTypeBoundClass a = bound.get(new ClassSymbol("a/A")); in hello()
88 assertThat(a.superclass()).isEqualTo(new ClassSymbol("java/lang/Object")); in hello()
91 assertThat(bound.get(new ClassSymbol("a/A$Inner1")).superclass()) in hello()
92 .isEqualTo(new ClassSymbol("b/B")); in hello()
[all …]
DClassPathBinderTest.java38 import com.google.turbine.binder.sym.ClassSymbol;
69 assertThat(result.sym()).isEqualTo(new ClassSymbol("java/lang/String")); in classPathLookup()
73 assertThat(result.sym()).isEqualTo(new ClassSymbol("java/lang/Object")); in classPathLookup()
78 Env<ClassSymbol, BytecodeBoundClass> env = TURBINE_BOOTCLASSPATH.env(); in classPathClasses()
80 TypeBoundClass c = env.get(new ClassSymbol("java/util/Map$Entry")); in classPathClasses()
81 assertThat(c.owner()).isEqualTo(new ClassSymbol("java/util/Map")); in classPathClasses()
84 assertThat(env.get(new ClassSymbol("javax/lang/model/SourceVersion")).kind()) in classPathClasses()
86 assertThat(env.get(new ClassSymbol("java/lang/String")).kind()).isEqualTo(TurbineTyKind.CLASS); in classPathClasses()
87 assertThat(env.get(new ClassSymbol("java/lang/Override")).kind()) in classPathClasses()
90 c = env.get(new ClassSymbol("java/util/ArrayList")); in classPathClasses()
[all …]
/external/turbine/java/com/google/turbine/binder/lookup/
DMemberImportIndex.java24 import com.google.turbine.binder.sym.ClassSymbol;
38 private final Map<String, Supplier<ClassSymbol>> cache = new LinkedHashMap<>();
40 private final ImmutableList<Supplier<ClassSymbol>> classes;
47 ImmutableList.Builder<Supplier<ClassSymbol>> packageScopes = ImmutableList.builder(); in MemberImportIndex()
55 new Supplier<ClassSymbol>() { in MemberImportIndex()
57 public ClassSymbol get() { in MemberImportIndex()
62 ClassSymbol sym = (ClassSymbol) result.sym(); in MemberImportIndex()
73 new Supplier<ClassSymbol>() { in MemberImportIndex()
75 public ClassSymbol get() { in MemberImportIndex()
80 ClassSymbol sym = (ClassSymbol) result.sym(); in MemberImportIndex()
[all …]
DSimpleTopLevelIndex.java22 import com.google.turbine.binder.sym.ClassSymbol;
43 @Nullable private final ClassSymbol sym;
49 Node(ClassSymbol sym) { in Node()
59 private Node insert(String name, ClassSymbol sym) { in insert()
86 public boolean insert(ClassSymbol sym) { in insert()
118 public static TopLevelIndex of(Iterable<ClassSymbol> syms) { in of()
120 for (ClassSymbol sym : syms) { in of()
190 private final Supplier<ImmutableList<ClassSymbol>> classes =
192 new Supplier<ImmutableList<ClassSymbol>>() {
194 public ImmutableList<ClassSymbol> get() {
[all …]
DImportIndex.java26 import com.google.turbine.binder.sym.ClassSymbol;
103 i.position(), ErrorKind.SYMBOL_NOT_FOUND, new ClassSymbol(Joiner.on('/').join(i.type()))); in namedImport()
106 ClassSymbol sym = (ClassSymbol) result.sym(); in namedImport()
113 ClassSymbol resolved = sym; in namedImport()
122 private static ClassSymbol resolveNext(
123 TurbineLogWithSource log, CanonicalSymbolResolver resolve, ClassSymbol sym, Ident bit) {
124 ClassSymbol next = resolve.resolveOne(sym, bit);
129 new ClassSymbol(sym.binaryName() + '$' + bit));
146 i.position(), ErrorKind.SYMBOL_NOT_FOUND, new ClassSymbol(Joiner.on("/").join(i.type())));
152 ClassSymbol sym = (ClassSymbol) base.sym();
/external/turbine/javatests/com/google/turbine/processing/
DTurbineElementTest.java25 import com.google.turbine.binder.sym.ClassSymbol;
56 TypeElement e = factory.typeElement(new ClassSymbol("java/util/Map$Entry")); in typeElement()
83 TypeElement e = factory.typeElement(new ClassSymbol("java/util/HashMap")); in superClass()
90 e = factory.typeElement(new ClassSymbol("java/lang/annotation/ElementType")); in superClass()
100 TypeElement e = factory.typeElement(new ClassSymbol("java/util/HashMap")); in interfaces()
114 TypeElement e = factory.typeElement(new ClassSymbol("java/util/HashMap")); in typeParameters()
127 factory.typeElement(new ClassSymbol("java/lang/Integer")).getEnclosedElements().stream() in enclosed()
137 factory.typeElement(new ClassSymbol("java/util/List")), in equals()
138 factory.typeElement(new ClassSymbol("java/util/List"))) in equals()
139 .addEqualityGroup(factory.typeElement(new ClassSymbol("java/util/ArrayList"))) in equals()
[all …]
DTurbineTypeMirrorTest.java25 import com.google.turbine.binder.sym.ClassSymbol;
75 new ClassSymbol("java/util/Map"), in equals()
79 new ClassSymbol("java/util/Map$Entry"), in equals()
87 new ClassSymbol("java/util/Map$Entry"), in equals()
92 Type.ClassTy.asNonParametricClassTy(new ClassSymbol("java/util/Map$Entry")))) in equals()
101 Type.ClassTy.asNonParametricClassTy(new ClassSymbol("java/lang/Integer")), in equals()
106 Type.ClassTy.asNonParametricClassTy(new ClassSymbol("java/lang/Integer")), in equals()
118 new TyVarSymbol(new ClassSymbol("java/util/List"), "V"), ImmutableList.of()))) in equals()
124 new ClassSymbol("java/io/Serializable")), in equals()
126 new ClassSymbol("java/lang/Cloneable")))))) in equals()
[all …]
/external/turbine/java/com/google/turbine/binder/bound/
DSourceBoundClass.java20 import com.google.turbine.binder.sym.ClassSymbol;
26 private final ClassSymbol sym;
27 private final ClassSymbol owner;
28 private final ImmutableMap<String, ClassSymbol> children;
33 ClassSymbol sym, in SourceBoundClass()
34 ClassSymbol owner, in SourceBoundClass()
35 ImmutableMap<String, ClassSymbol> children, in SourceBoundClass()
55 public ClassSymbol owner() { in owner()
65 public ImmutableMap<String, ClassSymbol> children() { in children()
69 public ClassSymbol sym() { in sym()
DSourceHeaderBoundClass.java23 import com.google.turbine.binder.sym.ClassSymbol;
33 private final ClassSymbol superclass;
34 private final ImmutableList<ClassSymbol> interfaces;
39 ClassSymbol superclass, in SourceHeaderBoundClass()
40 ImmutableList<ClassSymbol> interfaces, in SourceHeaderBoundClass()
49 public ClassSymbol superclass() { in superclass()
54 public ImmutableList<ClassSymbol> interfaces() { in interfaces()
69 public ClassSymbol owner() { in owner()
74 public ImmutableMap<String, ClassSymbol> children() { in children()
DModuleInfo.java20 import com.google.turbine.binder.sym.ClassSymbol;
164 private final ClassSymbol sym;
166 public UseInfo(ClassSymbol sym) { in UseInfo()
170 public ClassSymbol sym() { in sym()
178 private final ClassSymbol sym;
179 private final ImmutableList<ClassSymbol> impls;
181 public ProvideInfo(ClassSymbol sym, ImmutableList<ClassSymbol> impls) { in ProvideInfo()
186 public ClassSymbol sym() { in sym()
190 public ImmutableList<ClassSymbol> impls() { in impls()
DSourceTypeBoundClass.java23 import com.google.turbine.binder.sym.ClassSymbol;
38 private final ClassSymbol owner;
39 private final ImmutableMap<String, ClassSymbol> children;
64 ClassSymbol owner, in SourceTypeBoundClass()
66 ImmutableMap<String, ClassSymbol> children, in SourceTypeBoundClass()
95 public ClassSymbol superclass() { in superclass()
106 public ImmutableList<ClassSymbol> interfaces() { in interfaces()
107 ImmutableList.Builder<ClassSymbol> result = ImmutableList.builder(); in interfaces()
128 public ClassSymbol owner() { in owner()
133 public ImmutableMap<String, ClassSymbol> children() { in children()
/external/turbine/java/com/google/turbine/processing/
DClassHierarchy.java24 import com.google.turbine.binder.sym.ClassSymbol;
41 private final Map<ClassSymbol, HierarchyNode> cache = new HashMap<>();
42 private Env<ClassSymbol, ? extends TypeBoundClass> env;
44 ClassHierarchy(Env<ClassSymbol, ? extends TypeBoundClass> env) { in ClassHierarchy() argument
48 public void round(CompoundEnv<ClassSymbol, TypeBoundClass> env) { in round() argument
75 private final ClassSymbol sym;
76 private final Map<ClassSymbol, PathNode> ancestors = new LinkedHashMap<>();
78 HierarchyNode(ClassSymbol sym) { in HierarchyNode()
97 for (Map.Entry<ClassSymbol, PathNode> n : child.ancestors.entrySet()) { in add()
103 private Set<ClassSymbol> closure() { in closure()
[all …]
/external/turbine/javatests/com/google/turbine/binder/lookup/
DTopLevelIndexTest.java24 import com.google.turbine.binder.sym.ClassSymbol;
39 new ClassSymbol("java/util/Map"), in buildIndex()
40 new ClassSymbol("java/util/List"), in buildIndex()
41 new ClassSymbol("java.util.Optional"))); in buildIndex()
47 assertThat(result.sym()).isEqualTo(new ClassSymbol("java/util/Map")); in simple()
55 assertThat(result.sym()).isEqualTo(new ClassSymbol("java/util/Map")); in nested()
72 .isEqualTo(new ClassSymbol("java/util/Map")); in packageScope()
74 .isEqualTo(new ClassSymbol("java/util/List")); in packageScope()
84 ImmutableList.of(new ClassSymbol("java/Foo"), new ClassSymbol("java/Foo/Bar"))); in overrideClass()
87 assertThat(result.sym()).isEqualTo(new ClassSymbol("java/Foo")); in overrideClass()
[all …]
/external/turbine/java/com/google/turbine/deps/
DDependencies.java35 import com.google.turbine.binder.sym.ClassSymbol;
59 Set<ClassSymbol> closure = superTypeClosure(bound, lowered); in collectDeps()
62 for (ClassSymbol sym : closure) { in collectDeps()
89 private static Set<ClassSymbol> superTypeClosure(BindingResult bound, Lowered lowered) { in superTypeClosure()
90 Env<ClassSymbol, TypeBoundClass> env = in superTypeClosure()
91 CompoundEnv.<ClassSymbol, TypeBoundClass>of(new SimpleEnv<>(bound.units())) in superTypeClosure()
93 Set<ClassSymbol> closure = new LinkedHashSet<>(lowered.symbols()); in superTypeClosure()
94 for (ClassSymbol sym : lowered.symbols()) { in superTypeClosure()
109 Set<ClassSymbol> closure, ImmutableList<AnnoInfo> annotations) { in addAnnotations()
115 private static void addAnnotation(Set<ClassSymbol> closure, AnnoInfo annoInfo) { in addAnnotation()
[all …]
DTransitive.java28 import com.google.turbine.binder.sym.ClassSymbol;
47 for (ClassSymbol sym : superClosure(bound)) { in collectDeps()
102 private static Set<ClassSymbol> superClosure(BindingResult bound) { in superClosure()
103 Env<ClassSymbol, TypeBoundClass> env = in superClosure()
104 CompoundEnv.<ClassSymbol, TypeBoundClass>of(new SimpleEnv<>(bound.units())) in superClosure()
106 Set<ClassSymbol> closure = new LinkedHashSet<>(); in superClosure()
107 for (ClassSymbol sym : bound.units().keySet()) { in superClosure()
110 Set<ClassSymbol> directChildren = new LinkedHashSet<>(); in superClosure()
111 for (ClassSymbol sym : closure) { in superClosure()
122 Set<ClassSymbol> closure, Env<ClassSymbol, TypeBoundClass> env, ClassSymbol sym) { in addSuperTypes() argument
[all …]
/external/turbine/java/com/google/turbine/binder/bytecode/
DBytecodeBoundClass.java32 import com.google.turbine.binder.sym.ClassSymbol;
74 private final ClassSymbol sym;
75 private final Env<ClassSymbol, BytecodeBoundClass> env;
80 ClassSymbol sym, in BytecodeBoundClass()
82 Env<ClassSymbol, BytecodeBoundClass> env, in BytecodeBoundClass() argument
127 private final Supplier<ClassSymbol> owner =
129 new Supplier<ClassSymbol>() {
131 public ClassSymbol get() {
134 return new ClassSymbol(inner.outerClass());
143 public ClassSymbol owner() { in owner()
[all …]
/external/turbine/java/com/google/turbine/types/
DCanonicalize.java23 import com.google.turbine.binder.sym.ClassSymbol;
72 Env<ClassSymbol, TypeBoundClass> env, in canonicalize() argument
73 ClassSymbol sym, in canonicalize()
82 Env<ClassSymbol, TypeBoundClass> env, in canonicalizeClassTy() argument
83 ClassSymbol owner, in canonicalizeClassTy()
90 private final Env<ClassSymbol, TypeBoundClass> env;
92 public Canonicalize(SourceFile source, int position, Env<ClassSymbol, TypeBoundClass> env) { in Canonicalize() argument
98 private Type canonicalize(ClassSymbol base, Type type) { in canonicalize()
121 private ClassTy canon(ClassSymbol base, ClassTy ty) { in canon()
122 if (ty.sym().equals(ClassSymbol.ERROR)) { in canon()
[all …]
/external/turbine/javatests/com/google/turbine/lower/
DLowerSignatureTest.java22 import com.google.turbine.binder.sym.ClassSymbol;
47 new ClassSymbol("java/util/List"), ImmutableList.of(), ImmutableList.of()))); in simple()
60 new ClassSymbol("test/Outer"), in inner()
64 new ClassSymbol("test/Outer$Inner"), in inner()
76 new ClassSymbol("test/Outer"), in genericEnclosing()
80 new ClassSymbol("test/Outer$Inner"), in genericEnclosing()
98 new ClassSymbol("Outer"), in innerDefaultPackage()
102 new ClassSymbol("Outer$Inner"), in innerDefaultPackage()
117 new ClassSymbol("test/Test"), in wildcard()
135 new TyVarSymbol(ClassSymbol.OBJECT, "X"), ImmutableList.of())))) in tyVar()
/external/turbine/java/com/google/turbine/lower/
DLower.java45 import com.google.turbine.binder.sym.ClassSymbol;
94 private final ImmutableSet<ClassSymbol> symbols;
96 public Lowered(ImmutableMap<String, byte[]> bytes, ImmutableSet<ClassSymbol> symbols) { in Lowered()
107 public ImmutableSet<ClassSymbol> symbols() { in symbols()
114 ImmutableMap<ClassSymbol, SourceTypeBoundClass> units, in lowerAll() argument
116 Env<ClassSymbol, BytecodeBoundClass> classpath) { in lowerAll() argument
117 CompoundEnv<ClassSymbol, TypeBoundClass> env = in lowerAll()
118 CompoundEnv.<ClassSymbol, TypeBoundClass>of(classpath).append(new SimpleEnv<>(units)); in lowerAll()
120 Set<ClassSymbol> symbols = new LinkedHashSet<>(); in lowerAll()
121 for (ClassSymbol sym : units.keySet()) { in lowerAll()
[all …]

123