org.codehaus.groovy.classgen.asm
Class BinaryExpressionMultiTypeDispatcher

java.lang.Object
  extended by org.codehaus.groovy.classgen.asm.BinaryExpressionHelper
      extended by org.codehaus.groovy.classgen.asm.BinaryExpressionMultiTypeDispatcher

public class BinaryExpressionMultiTypeDispatcher
extends BinaryExpressionHelper

This class is for internal use only! This class will dispatch to the right type adapters according to the kind of binary expression that is provided.

Author:
Jochen "blackdrag" Theodorou

Field Summary
protected static Map<ClassNode,Integer> typeMap
           
protected static String[] typeMapKeyNames
           
 
Constructor Summary
BinaryExpressionMultiTypeDispatcher(WriterController wc)
           
 
Method Summary
protected  void assignToArray(Expression orig, Expression receiver, Expression index, Expression rhsValueLoader)
           
protected  void evaluateBinaryExpression(String message, BinaryExpression binExp)
           
protected  void evaluateBinaryExpressionWithAssignment(String method, BinaryExpression binExp)
           
protected  void evaluateCompareExpression(MethodCaller compareMethod, BinaryExpression binExp)
           
protected static ClassNode getType(Expression exp, ClassNode current)
          return the type of an expression, taking meta data into account
protected static boolean isDoubleCategory(ClassNode type)
           
protected static boolean isIntCategory(ClassNode type)
           
protected static boolean isLongCategory(ClassNode type)
           
protected  void writePostOrPrefixMethod(int op, String method, Expression expression, Expression orig)
           
 
Methods inherited from class org.codehaus.groovy.classgen.asm.BinaryExpressionHelper
eval, evaluateEqual, evaluatePostfixMethod, evaluatePrefixMethod, getController, getIsCaseMethod
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

typeMap

protected static Map<ClassNode,Integer> typeMap

typeMapKeyNames

protected static final String[] typeMapKeyNames
Constructor Detail

BinaryExpressionMultiTypeDispatcher

public BinaryExpressionMultiTypeDispatcher(WriterController wc)
Method Detail

getType

protected static ClassNode getType(Expression exp,
                                   ClassNode current)
return the type of an expression, taking meta data into account


isIntCategory

protected static boolean isIntCategory(ClassNode type)

isLongCategory

protected static boolean isLongCategory(ClassNode type)

isDoubleCategory

protected static boolean isDoubleCategory(ClassNode type)

evaluateCompareExpression

protected void evaluateCompareExpression(MethodCaller compareMethod,
                                         BinaryExpression binExp)
Overrides:
evaluateCompareExpression in class BinaryExpressionHelper

evaluateBinaryExpression

protected void evaluateBinaryExpression(String message,
                                        BinaryExpression binExp)
Overrides:
evaluateBinaryExpression in class BinaryExpressionHelper

evaluateBinaryExpressionWithAssignment

protected void evaluateBinaryExpressionWithAssignment(String method,
                                                      BinaryExpression binExp)
Overrides:
evaluateBinaryExpressionWithAssignment in class BinaryExpressionHelper

assignToArray

protected void assignToArray(Expression orig,
                             Expression receiver,
                             Expression index,
                             Expression rhsValueLoader)
Overrides:
assignToArray in class BinaryExpressionHelper

writePostOrPrefixMethod

protected void writePostOrPrefixMethod(int op,
                                       String method,
                                       Expression expression,
                                       Expression orig)
Overrides:
writePostOrPrefixMethod in class BinaryExpressionHelper

Copyright © 2003-2010 The Codehaus. All rights reserved.