All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gw.lang.ir.expression.IRNewArrayExpression Maven / Gradle / Ivy

There is a newer version: 1.18.2
Show newest version
/*
 * Copyright 2014 Guidewire Software, Inc.
 */

package gw.lang.ir.expression;

import gw.lang.ir.IRExpression;
import gw.lang.ir.IRType;
import gw.lang.UnstableAPI;

@UnstableAPI
public class IRNewArrayExpression extends IRExpression {
  private IRType _componentType;
  private IRExpression _sizeExpression;

  public IRNewArrayExpression(IRType componentType, IRExpression sizeExpression) {
    _componentType = maybeEraseStructuralType( componentType );
    _sizeExpression = sizeExpression;

    sizeExpression.setParent( this );
  }

  public IRType getComponentType() {
    return _componentType;
  }

  public IRType getType() {
    return _componentType.getArrayType();
  }

  public IRExpression getSizeExpression() {
    return _sizeExpression;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy