1 4 5 9 10 package org.openlaszlo.sc.parser; 11 12 public class ASTIdentifier extends SimpleNode { 13 private String name = null; 14 private int hash = 0; 15 16 public ASTIdentifier(int id) { 17 super(id); 18 } 19 20 public ASTIdentifier(Parser p, int id) { 21 super(p, id); 22 } 23 24 public static Node jjtCreate(int id) { 25 return new ASTIdentifier(id); 26 } 27 28 public static Node jjtCreate(Parser p, int id) { 29 return new ASTIdentifier(p, id); 30 } 31 32 public ASTIdentifier(String s) { 34 setName(s); 35 } 36 37 public void setName(String name) { 38 this.name = name.intern(); this.hash = name.hashCode(); 40 } 41 42 public int hashCode() { 43 return hash; 44 } 45 46 public String getName() { 47 return name; 48 } 49 50 public String toString() { 51 return "ASTIdentifier(" + name + ")"; 52 } 53 } 54 | Popular Tags |