Examples of TypedResult


Examples of org.formulacompiler.compiler.internal.expressions.TypedResult

  @Override
  protected void traverse( TypedResult[] _args, int _firstFoldedArg ) throws CompilerException
  {
    for (int i = _args.length - 1; i >= _firstFoldedArg; i--) {
      final TypedResult xi = _args[ i ];
      if (isNesting( xi )) {
        traverse( ((ExpressionNode) xi).arguments() );
      }
      else {
        traverseElements( xi );
View Full Code Here

Examples of org.formulacompiler.compiler.internal.expressions.TypedResult

  @Override
  protected TypedResult eval() throws CompilerException
  {
    final int card = cardinality();
    if (card > 0) {
      final TypedResult firstArg = evaluateArgument( 0 );
      if (firstArg.hasConstantValue()) {
        final boolean constFirstArg = type().toBoolean( firstArg.getConstantValue() );
        switch (card) {
          case 2:
            return (constFirstArg) ? evaluateArgument( 1 ) : null;
          case 3:
            return (constFirstArg) ? evaluateArgument( 1 ) : evaluateArgument( 2 );
View Full Code Here

Examples of org.formulacompiler.compiler.internal.expressions.TypedResult

  protected boolean visitCell( CellModel _cell ) throws CompilerException
  {
    ExpressionNode sourceExpr = _cell.getExpression();
    if (null != sourceExpr) {
      try {
        TypedResult optimizedResult = eliminateConstantsFrom( sourceExpr, _cell.getSection() );
        assert (optimizedResult.getDataType() == _cell.getDataType() || optimizedResult.getDataType() == DataType.NULL);
        if (optimizedResult.hasConstantValue()) {
          _cell.setExpression( null );
          final Object value = optimizedResult.getConstantValue();
          _cell.setConstantValue( value );
          if (this.listenerSupport != null) {
            this.listenerSupport.constantExpressionEliminated( _cell, value );
          }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.