1 46 package org.codehaus.groovy.ast.expr; 47 48 import java.util.List ; 49 50 import org.codehaus.groovy.ast.Parameter; 51 52 58 public class ArgumentListExpression extends TupleExpression { 59 60 public static final Object [] EMPTY_ARRAY = { 61 }; 62 63 public static final ArgumentListExpression EMPTY_ARGUMENTS = new ArgumentListExpression(); 64 65 public ArgumentListExpression() { 66 } 67 68 public ArgumentListExpression(List expressions) { 69 super(expressions); 70 } 71 72 public ArgumentListExpression(Expression[] expressions) { 73 super(expressions); 74 } 75 76 public ArgumentListExpression(Parameter[] parameters) { 77 for (int i = 0; i < parameters.length; i++) { 78 Parameter parameter = parameters[i]; 79 addExpression(new VariableExpression(parameter.getName())); 80 } 81 } 82 83 public boolean isDynamic() { 84 return false; } 86 87 public Expression transformExpression(ExpressionTransformer transformer) { 88 return new ArgumentListExpression(transformExpressions(getExpressions(), transformer)); 89 } 90 } 91 | Popular Tags |