1 34 package org.codehaus.groovy.ast.expr; 35 36 import org.codehaus.groovy.ast.GroovyCodeVisitor; 37 import org.codehaus.groovy.classgen.AsmClassGenerator; 38 39 42 public class BitwiseNegExpression extends Expression { 43 44 private Expression expression; 45 46 public BitwiseNegExpression(Expression expression) { 47 this.expression = expression; 48 } 49 50 public Expression getExpression() { 51 return expression; 52 } 53 54 public void visit(GroovyCodeVisitor visitor) { 55 visitor.visitBitwiseNegExpression(this); 56 } 57 58 public Expression transformExpression(ExpressionTransformer transformer) { 59 return new BitwiseNegExpression(transformer.transform(expression)); 60 } 61 62 protected void resolveType(AsmClassGenerator resolver) { 63 expression.resolve(resolver); 64 setTypeClass(expression.getTypeClass()); 65 } 66 67 public String getText() { 68 return expression.getText(); 69 } 70 71 public String getType() { 72 return expression.getType(); 73 } 74 75 public boolean isDynamic() { 76 return false; } 78 79 public Class getTypeClass() { 80 return expression.getTypeClass(); 81 } 82 } 83 | Popular Tags |