1 11 package org.eclipse.jdt.internal.eval; 12 13 17 public class GlobalVariable { 18 char[] typeName; 19 char[] name; 20 char[] initializer; 21 int declarationStart = -1, initializerStart = -1, initExpressionStart; int initializerLineStart = -1; 27 public GlobalVariable(char[] typeName, char[] name, char[] initializer) { 28 this.typeName = typeName; 29 this.name = name; 30 this.initializer = initializer; 31 } 32 37 public char[] getInitializer() { 38 return this.initializer; 39 } 40 43 public char[] getName() { 44 return this.name; 45 } 46 50 public char[] getTypeName() { 51 return this.typeName; 52 } 53 57 public String toString() { 58 StringBuffer buffer = new StringBuffer (); 59 buffer.append(this.typeName); 60 buffer.append(" "); buffer.append(this.name); 62 if (this.initializer != null) { 63 buffer.append("= "); buffer.append(this.initializer); 65 } 66 buffer.append(";"); return buffer.toString(); 68 } 69 } 70 | Popular Tags |