当前位置: 首页>>代码示例>>Java>>正文


Java Token.SETELEM属性代码示例

本文整理汇总了Java中org.mozilla.javascript.Token.SETELEM属性的典型用法代码示例。如果您正苦于以下问题:Java Token.SETELEM属性的具体用法?Java Token.SETELEM怎么用?Java Token.SETELEM使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.mozilla.javascript.Token的用法示例。


在下文中一共展示了Token.SETELEM属性的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: processChild

/**
 * process child node
 * 
 * @param parent
 * @param child
 * @param tree
 * @param columnExprList
 * @throws BirtException
 */
private void processChild( Node child, ScriptNode tree,
		List columnExprList ) throws BirtException
{
	switch ( child.getType( ) )
	{
		case Token.NUMBER :
		case Token.STRING :
		case Token.NULL :
		case Token.TRUE :
		case Token.FALSE :
			break;

		case Token.GETPROP :
		case Token.GETELEM :
		case Token.SETPROP :
		case Token.SETELEM :
		{
			compileDirectColRefExpr( child, tree, columnExprList );
			break;
		}
		case Token.CALL :
			compileAggregateExpr( child, tree, columnExprList );
			break;
		default :
			compileComplexExpr( child, tree, columnExprList );
	}

}
 
开发者ID:eclipse,项目名称:birt,代码行数:37,代码来源:ExpressionParserUtility.java

示例2: compileDirectColRefExpr

/**
 * compile column reference expression
 * 
 * @param refNode
 * @throws BirtException
 */
private void compileDirectColRefExpr( Node refNode, ScriptNode tree,
		List columnExprList ) throws BirtException
{
	assert ( refNode.getType( ) == Token.GETPROP
			|| refNode.getType( ) == Token.GETELEM
			|| refNode.getType( ) == Token.SETELEM || refNode.getType( ) == Token.SETPROP );

	Node rowName = refNode.getFirstChild( );
	assert ( rowName != null );
	if ( rowName.getType( ) != Token.NAME )
	{
		if ( refNode.getType( ) == Token.GETPROP
				|| refNode.getType( ) == Token.GETELEM
				|| refNode.getType( ) == Token.SETELEM
				|| refNode.getType( ) == Token.SETPROP )
		{
			compileOuterColRef( refNode, tree, columnExprList );
			compileRowPositionRef( refNode, tree, columnExprList );
			return;
		}
		compileComplexExpr( refNode, tree, columnExprList );
		return;
	}
	else
		compileSimpleColumnRefExpr( refNode, tree, columnExprList );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:32,代码来源:ExpressionParserUtility.java

示例3: compileRowPositionRef

/**
 * compile row position expression
 * @param refNode
 * @param tree
 * @param columnExprList
 * @throws BirtException
 */
private void compileRowPositionRef( Node refNode, ScriptNode tree,
		List columnExprList ) throws BirtException
{
	Node rowFirstNode = refNode.getFirstChild( );

	if ( rowFirstNode.getType( ) == Token.GETELEM
			|| rowFirstNode.getType( ) == Token.SETELEM )
	{
		Node rowNode = rowFirstNode.getFirstChild( );
		if ( rowNode != null
				&& rowNode.getType( ) == Token.NAME
				&& rowNode.getString( ).equals( ROWS_0_INDICATOR ) )
		{
			Node rowColumn = rowNode.getNext( );
			if ( rowColumn.getDouble( ) == 0.0 )
			{
				rowColumn = rowFirstNode.getNext( );
				if ( rowColumn.getType( ) == Token.STRING
						&& ( refNode.getType( ) == Token.GETELEM || refNode.getType( ) == Token.SETELEM ) )
				{
					ColumnBinding binding = new ColumnBinding( rowColumn.getString( ),
							ExpressionUtil.createJSDataSetRowExpression( rowColumn.getString( ) ),
							1 );
					columnExprList.add( binding );;
				}
			}
		}
	}
}
 
开发者ID:eclipse,项目名称:birt,代码行数:36,代码来源:ExpressionParserUtility.java

示例4: hasSideEffects

@Override
public boolean hasSideEffects()
{
    switch (getType()) {
      case Token.ASSIGN:
      case Token.ASSIGN_ADD:
      case Token.ASSIGN_BITAND:
      case Token.ASSIGN_BITOR:
      case Token.ASSIGN_BITXOR:
      case Token.ASSIGN_DIV:
      case Token.ASSIGN_LSH:
      case Token.ASSIGN_MOD:
      case Token.ASSIGN_MUL:
      case Token.ASSIGN_RSH:
      case Token.ASSIGN_SUB:
      case Token.ASSIGN_URSH:
      case Token.BLOCK:
      case Token.BREAK:
      case Token.CALL:
      case Token.CATCH:
      case Token.CATCH_SCOPE:
      case Token.CONST:
      case Token.CONTINUE:
      case Token.DEC:
      case Token.DELPROP:
      case Token.DEL_REF:
      case Token.DO:
      case Token.ELSE:
      case Token.ENTERWITH:
      case Token.ERROR:         // Avoid cascaded error messages
      case Token.EXPORT:
      case Token.EXPR_RESULT:
      case Token.FINALLY:
      case Token.FUNCTION:
      case Token.FOR:
      case Token.GOTO:
      case Token.IF:
      case Token.IFEQ:
      case Token.IFNE:
      case Token.IMPORT:
      case Token.INC:
      case Token.JSR:
      case Token.LABEL:
      case Token.LEAVEWITH:
      case Token.LET:
      case Token.LETEXPR:
      case Token.LOCAL_BLOCK:
      case Token.LOOP:
      case Token.NEW:
      case Token.REF_CALL:
      case Token.RETHROW:
      case Token.RETURN:
      case Token.RETURN_RESULT:
      case Token.SEMI:
      case Token.SETELEM:
      case Token.SETELEM_OP:
      case Token.SETNAME:
      case Token.SETPROP:
      case Token.SETPROP_OP:
      case Token.SETVAR:
      case Token.SET_REF:
      case Token.SET_REF_OP:
      case Token.SWITCH:
      case Token.TARGET:
      case Token.THROW:
      case Token.TRY:
      case Token.VAR:
      case Token.WHILE:
      case Token.WITH:
      case Token.WITHEXPR:
      case Token.YIELD:
        return true;

      default:
        return false;
    }
}
 
开发者ID:MikaGuraN,项目名称:HL4A,代码行数:77,代码来源:AstNode.java

示例5: hasSideEffects

public boolean hasSideEffects()
{
    switch (getType()) {
      case Token.ASSIGN:
      case Token.ASSIGN_ADD:
      case Token.ASSIGN_BITAND:
      case Token.ASSIGN_BITOR:
      case Token.ASSIGN_BITXOR:
      case Token.ASSIGN_DIV:
      case Token.ASSIGN_LSH:
      case Token.ASSIGN_MOD:
      case Token.ASSIGN_MUL:
      case Token.ASSIGN_RSH:
      case Token.ASSIGN_SUB:
      case Token.ASSIGN_URSH:
      case Token.BLOCK:
      case Token.BREAK:
      case Token.CALL:
      case Token.CATCH:
      case Token.CATCH_SCOPE:
      case Token.CONST:
      case Token.CONTINUE:
      case Token.DEC:
      case Token.DELPROP:
      case Token.DEL_REF:
      case Token.DO:
      case Token.ELSE:
      case Token.ENTERWITH:
      case Token.ERROR:         // Avoid cascaded error messages
      case Token.EXPORT:
      case Token.EXPR_RESULT:
      case Token.FINALLY:
      case Token.FUNCTION:
      case Token.FOR:
      case Token.GOTO:
      case Token.IF:
      case Token.IFEQ:
      case Token.IFNE:
      case Token.IMPORT:
      case Token.INC:
      case Token.JSR:
      case Token.LABEL:
      case Token.LEAVEWITH:
      case Token.LET:
      case Token.LETEXPR:
      case Token.LOCAL_BLOCK:
      case Token.LOOP:
      case Token.NEW:
      case Token.REF_CALL:
      case Token.RETHROW:
      case Token.RETURN:
      case Token.RETURN_RESULT:
      case Token.SEMI:
      case Token.SETELEM:
      case Token.SETELEM_OP:
      case Token.SETNAME:
      case Token.SETPROP:
      case Token.SETPROP_OP:
      case Token.SETVAR:
      case Token.SET_REF:
      case Token.SET_REF_OP:
      case Token.SWITCH:
      case Token.TARGET:
      case Token.THROW:
      case Token.TRY:
      case Token.VAR:
      case Token.WHILE:
      case Token.WITH:
      case Token.WITHEXPR:
      case Token.YIELD:
        return true;

      default:
        return false;
    }
}
 
开发者ID:middle2tw,项目名称:whackpad,代码行数:76,代码来源:AstNode.java

示例6: hasSideEffects

@Override
public boolean hasSideEffects()
  {
      switch (getType()) {
        case Token.ASSIGN:
        case Token.ASSIGN_ADD:
        case Token.ASSIGN_BITAND:
        case Token.ASSIGN_BITOR:
        case Token.ASSIGN_BITXOR:
        case Token.ASSIGN_DIV:
        case Token.ASSIGN_LSH:
        case Token.ASSIGN_MOD:
        case Token.ASSIGN_MUL:
        case Token.ASSIGN_RSH:
        case Token.ASSIGN_SUB:
        case Token.ASSIGN_URSH:
        case Token.BLOCK:
        case Token.BREAK:
        case Token.CALL:
        case Token.CATCH:
        case Token.CATCH_SCOPE:
        case Token.CONST:
        case Token.CONTINUE:
        case Token.DEC:
        case Token.DELPROP:
        case Token.DEL_REF:
        case Token.DO:
        case Token.ELSE:
        case Token.ENTERWITH:
        case Token.ERROR:         // Avoid cascaded error messages
        case Token.EXPORT:
        case Token.EXPR_RESULT:
        case Token.FINALLY:
        case Token.FUNCTION:
        case Token.FOR:
        case Token.GOTO:
        case Token.IF:
        case Token.IFEQ:
        case Token.IFNE:
        case Token.IMPORT:
        case Token.INC:
        case Token.JSR:
        case Token.LABEL:
        case Token.LEAVEWITH:
        case Token.LET:
        case Token.LETEXPR:
        case Token.LOCAL_BLOCK:
        case Token.LOOP:
        case Token.NEW:
        case Token.REF_CALL:
        case Token.RETHROW:
        case Token.RETURN:
        case Token.RETURN_RESULT:
        case Token.SEMI:
        case Token.SETELEM:
        case Token.SETELEM_OP:
        case Token.SETNAME:
        case Token.SETPROP:
        case Token.SETPROP_OP:
        case Token.SETVAR:
        case Token.SET_REF:
        case Token.SET_REF_OP:
        case Token.SWITCH:
        case Token.TARGET:
        case Token.THROW:
        case Token.TRY:
        case Token.VAR:
        case Token.WHILE:
        case Token.WITH:
        case Token.WITHEXPR:
        case Token.YIELD:
          return true;

        default:
          return false;
      }
  }
 
开发者ID:tiffit,项目名称:TaleCraft,代码行数:77,代码来源:AstNode.java

示例7: compileOuterColRefExpr

/**
 * 
 * @param refNode
 * @return
 */
private int compileOuterColRefExpr( Node refNode )
{
	int count = 0;
	Node rowFirstNode = refNode.getFirstChild( );
	if ( refNode.getType( ) == Token.GETPROP
			|| refNode.getType( ) == Token.GETELEM
			|| refNode.getType( ) == Token.SETPROP
			|| refNode.getType( ) == Token.SETELEM )
	{
		if ( rowFirstNode.getType( ) == Token.NAME
				&& rowFirstNode.getString( ).equals( ROW_INDICATOR ) )
		{
			Node rowColumn = rowFirstNode.getNext( );
			if ( rowColumn.getType( ) == Token.STRING )
			{
				if ( "_outer".equals( rowColumn.getString( ) ) )
					count++;
			}
			return count;
		}
		else if ( rowFirstNode.getType( ) == Token.GETPROP
				|| rowFirstNode.getType( ) == Token.SETPROP )
		{
			if ( compileOuterColRefExpr( rowFirstNode ) == -1 )
				return -1;
			else
				count = count + compileOuterColRefExpr( rowFirstNode );
			Node nextChild = rowFirstNode.getNext( );
			if ( nextChild.getType( ) == Token.STRING )
			{
				if ( "_outer".equals( nextChild.getString( ) ) )
					count++;
			}
		}
		else
			return -1;
		return count;
	}
	else
		return -1;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:46,代码来源:ExpressionParserUtility.java


注:本文中的org.mozilla.javascript.Token.SETELEM属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。