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

gw.lang.ir.expression.IRFieldGetExpression 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 IRFieldGetExpression extends IRExpression {
  private IRExpression _lhs;
  private String _name;
  private IRType _fieldType;
  private IRType _ownersType;

  public IRFieldGetExpression(IRExpression lhs, String name, IRType fieldType, IRType ownersType) {
    _lhs = lhs;
    _name = name;
    _fieldType = maybeEraseStructuralType( ownersType, fieldType );
    _ownersType = ownersType;

    if (lhs != null) {
      lhs.setParent( this );
    }
  }

  public IRExpression getLhs() {
    return _lhs;
  }

  public String getName() {
    return _name;
  }

  public IRType getFieldType() {
    return _fieldType;
  }

  public IRType getOwnersType() {
    return _ownersType;
  }

  @Override
  public IRType getType() {
    return _fieldType;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy