View Javadoc
1 package net.sf.plb4jedit.plb; 2 3 class Type { 4 private int type; 5 6 public static final Type COMMENT = new Type(1); 7 public static final Type INCLUDE = new Type(2); 8 public static final Type VARDEF = new Type(3); 9 public static final Type ROUTINE = new Type(4); 10 public static final Type COMMAND = new Type(5); 11 public static final Type EMPTY = new Type(6); 12 public static final Type UNKNOWN = new Type(7); 13 14 private Type(){} 15 16 private Type(int no) { 17 type = no; 18 } 19 20 public String toString() { 21 StringBuffer sb = new StringBuffer(); 22 if (this == COMMENT) { 23 sb.append("comment"); 24 } else if (this == INCLUDE) { 25 sb.append("include"); 26 } else if (this == VARDEF ) { 27 sb.append("vardef"); 28 } else if (this == ROUTINE ) { 29 sb.append("routine"); 30 } else if (this == COMMAND ) { 31 sb.append("command"); 32 } else if (this == EMPTY ) { 33 sb.append("empty"); 34 } else if (this == UNKNOWN ) { 35 sb.append("unknown"); 36 } else { 37 //sb.append(""); 38 } 39 return sb.toString(); 40 } 41 42 public static void main (String[] args) { 43 System.out.println("Test="+Type.COMMENT); 44 } 45 46 }

This page was automatically generated by Maven