]> gerrit.simantics Code Review - simantics/platform.git/blob - KCon.java
73ac011bf29e73a7a58d13afccbdf66bec766746
[simantics/platform.git] / KCon.java
1 package org.simantics.scl.compiler.types.kinds;
2
3 import org.simantics.scl.compiler.types.util.TypeUnparsingContext;
4
5 /**
6  * This class represent a type kind constant with a given name.
7  * 
8  * The {@link #contains(KMetaVar)} method always returns false, as kind constants do not
9  * include any meta-variable-references.
10  */
11 public class KCon extends Kind {
12     public final String name;
13
14     KCon(String name) {
15         this.name = name;
16     }
17
18     @Override
19     public String toString() {
20         return name;
21     }
22     
23     @Override
24     protected void toStringPar(TypeUnparsingContext tuc, StringBuilder b) {
25         b.append(name);
26     }
27
28     @Override
29     public boolean contains(KMetaVar var) {
30         return false;
31     }    
32 }