1 package org.simantics.scl.compiler.environment;
3 import java.util.Collection;
4 import java.util.Collections;
5 import java.util.function.Consumer;
7 import org.simantics.scl.compiler.elaboration.chr.CHRRuleset;
8 import org.simantics.scl.compiler.elaboration.modules.SCLValue;
9 import org.simantics.scl.compiler.elaboration.modules.TypeClass;
10 import org.simantics.scl.compiler.elaboration.modules.TypeConstructor;
11 import org.simantics.scl.compiler.elaboration.relations.SCLEntityType;
12 import org.simantics.scl.compiler.elaboration.relations.SCLRelation;
13 import org.simantics.scl.compiler.elaboration.rules.MappingRelation;
14 import org.simantics.scl.compiler.elaboration.rules.TransformationRule;
15 import org.simantics.scl.compiler.environment.filter.NamespaceFilter;
16 import org.simantics.scl.compiler.internal.codegen.effects.EffectConstructor;
17 import org.simantics.scl.compiler.types.TCon;
19 import gnu.trove.procedure.TObjectProcedure;
21 public enum EmptyNamespace implements Namespace {
25 public Namespace getNamespace(String name) {
30 public Collection<String> getNamespaces() {
31 return Collections.emptyList();
35 public SCLValue getValue(String name) throws AmbiguousNameException {
40 public SCLRelation getRelation(String name) throws AmbiguousNameException {
45 public SCLEntityType getEntityType(String name)
46 throws AmbiguousNameException {
51 public TypeConstructor getTypeDescriptor(String name) throws AmbiguousNameException {
56 public EffectConstructor getEffectConstructor(String name)
57 throws AmbiguousNameException {
62 public TypeClass getTypeClass(String name) throws AmbiguousNameException {
67 public MappingRelation getMappingRelation(String name)
68 throws AmbiguousNameException {
73 public TransformationRule getRule(String name) throws AmbiguousNameException {
78 public void findValuesForPrefix(String prefix, NamespaceFilter filter, TObjectProcedure<SCLValue> proc) {
82 public void findTypesForPrefix(String prefix, NamespaceFilter filter, Consumer<TCon> consumer) {
86 public CHRRuleset getRuleset(String name) throws AmbiguousNameException {