1 46 package org.codehaus.groovy.ast; 47 48 import org.objectweb.asm.Constants; 49 50 56 public class ImportNode extends MetadataNode implements Constants { 57 58 private String className; 59 private String alias; 60 61 public ImportNode(String className, String alias) { 62 this.className = className; 63 this.alias = alias; 64 } 65 66 69 public String getText() { 70 if (alias == null || alias.length() == 0) { 71 return "import " + className; 72 } 73 else { 74 return "import " + className + " as " + alias; 75 } 76 } 77 78 public String getAlias() { 79 return alias; 80 } 81 82 public String getClassName() { 83 return className; 84 } 85 86 } 87 | Popular Tags |