1 46 package org.codehaus.groovy.ast.expr; 47 48 import org.codehaus.groovy.ast.GroovyCodeVisitor; 49 import org.codehaus.groovy.classgen.AsmClassGenerator2; 50 51 58 public class ClassExpression extends Expression { 59 60 public ClassExpression(String type) { 61 super.setType(type); 62 } 63 64 public ClassExpression(Class cls) { 65 super.setTypeClass(cls); 66 } 67 68 public void visit(GroovyCodeVisitor visitor) { 69 visitor.visitClassExpression(this); 70 } 71 72 public Expression transformExpression(ExpressionTransformer transformer) { 73 return this; 74 } 75 76 public String getText() { 77 return type; 78 } 79 80 public String toString() { 81 return super.toString() + "[type: " + type + "]"; 82 } 83 84 protected void resolveType(AsmClassGenerator2 resolver) { 85 } 87 } 88 | Popular Tags |