]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/kinds/KCon.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / types / kinds / 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 }