public CastExpression(ClassNode type, Expression expression, boolean ignoreAutoboxing) { super.setType(type); this.expression = expression; this.ignoreAutoboxing = ignoreAutoboxing; }
/** * Set the type of this variable. If you call this method from an AST transformation and that * the {@link #getAccessedVariable() accessed variable} is ({@link #isClosureSharedVariable() shared}, * this operation is unsafe and may lead to a verify error at compile time. Instead, set the type of * the {@link #getAccessedVariable() accessed variable} * @param cn the type to be set on this variable */ public void setType(ClassNode cn){ super.setType(cn); isDynamicTyped |= ClassHelper.DYNAMIC_TYPE==cn; }
public GStringExpression(String verbatimText, List<ConstantExpression> strings, List<Expression> values) { this.verbatimText = verbatimText; this.strings = strings; this.values = values; super.setType(ClassHelper.GSTRING_TYPE); }
public BytecodeExpression(ClassNode type) { super.setType(type); }
public void setType(ClassNode t) { super.setType(t); }
public ClassExpression(ClassNode type) { super.setType(type); }
public GStringExpression(String verbatimText) { this.verbatimText = verbatimText; super.setType(ClassHelper.GSTRING_TYPE); this.strings = new ArrayList<ConstantExpression>(); this.values = new ArrayList<Expression>(); }
public ConstructorCallExpression(ClassNode type, Expression arguments) { super.setType(type); if (!(arguments instanceof TupleExpression)) { this.arguments = new TupleExpression(arguments); } else { this.arguments = arguments; } }
public void setType(ClassNode type) { super.setType(type); field.setType(type); }
public ClosureExpression(Parameter[] parameters, Statement code) { this.parameters = parameters; this.code = code; super.setType(ClassHelper.CLOSURE_TYPE.getPlainNodeReference()); }
public ArrayExpression(ClassNode elementType, List<Expression> expressions, List<Expression> sizeExpression) { //expect to get the elementType super.setType(makeArray(elementType, sizeExpression)); if (expressions == null) expressions = Collections.emptyList(); this.elementType = elementType; this.expressions = expressions; this.sizeExpression = sizeExpression; for (Object item : expressions) { if (item != null && !(item instanceof Expression)) { throw new ClassCastException("Item: " + item + " is not an Expression"); } } if (sizeExpression != null) { for (Object item : sizeExpression) { if (!(item instanceof Expression)) { throw new ClassCastException("Item: " + item + " is not an Expression"); } } } }
if (thisField != null) { fixedReceiver = new PropertyExpression(fixedReceiver, "this$0"); fixedReceiver.setType(current);
/** * Set the type of this variable. If you call this method from an AST transformation and that * the {@link #getAccessedVariable() accessed variable} is ({@link #isClosureSharedVariable() shared}, * this operation is unsafe and may lead to a verify error at compile time. Instead, set the type of * the {@link #getAccessedVariable() accessed variable} * @param cn the type to be set on this variable */ public void setType(ClassNode cn){ super.setType(cn); isDynamicTyped |= ClassHelper.DYNAMIC_TYPE==cn; }
public ClosureExpression(Parameter[] parameters, Statement code) { this.parameters = parameters; this.code = code; super.setType(ClassHelper.CLOSURE_TYPE); }
public CastExpression(ClassNode type, Expression expression, boolean ignoreAutoboxing) { super.setType(type); this.expression = expression; this.ignoreAutoboxing = ignoreAutoboxing; }
public CastExpression(ClassNode type, Expression expression, boolean ignoreAutoboxing) { super.setType(type); this.expression = expression; this.ignoreAutoboxing = ignoreAutoboxing; }
public GStringExpression(String verbatimText, List strings, List values) { this.verbatimText = verbatimText; this.strings = strings; this.values = values; super.setType(ClassHelper.GSTRING_TYPE); }
public ConstructorCallExpression(ClassNode type, Expression arguments) { super.setType(type); if (!(arguments instanceof TupleExpression)){ this.arguments = new TupleExpression(arguments); } else { this.arguments = arguments; } }
public ConstructorCallExpression(ClassNode type, Expression arguments) { super.setType(type); if (!(arguments instanceof TupleExpression)){ this.arguments = new TupleExpression(arguments); } else { this.arguments = arguments; } }