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

gw.lang.function.AbstractBlock Maven / Gradle / Ivy

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

package gw.lang.function;

import gw.lang.parser.IBlockClass;
import gw.lang.parser.expressions.IBlockExpression;
import gw.lang.reflect.IType;
import gw.lang.reflect.IFunctionType;
import gw.lang.reflect.TypeSystem;

public abstract class AbstractBlock implements IBlock
{
  @Override
  public IBlockExpression getParsedElement()
  {
    IBlockClass type = (IBlockClass)getIntrinsicType();
    return type.getBlock();
  }

  @Override
  public IFunctionType getFunctionType()
  {
    return (IFunctionType)getParsedElement().getType();
  }

  @Override
  public String toString() {
    return getParsedElement().toString();
  }

  @Override
  public IType getIntrinsicType()
  {
    return TypeSystem.get( getClass() );
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy