org.objectweb.medor.expression.type
Class ExpressionTypeHelper
java.lang.Objectorg.objectweb.medor.expression.type.ExpressionTypeHelper
public class ExpressionTypeHelper
extends java.lang.Object
- A. Lefebvre
static PType | getResultType(PType type1, PType type2)- This method returns the type which would result from applying a binary
operator to 2 objects of given PType.
|
static boolean | isArithmeticType(PType t)- This method tells if a given Type is an arithmetic type
|
getResultType
public static PType getResultType(PType type1,
PType type2)
throws TypingException This method returns the type which would result from applying a binary
operator to 2 objects of given PType.
If the two PTypes are incompatible, a TypingException is thrown.
type1 - The PType of the first object.type2 - The PType of the second object.
- The PType of the result.
isArithmeticType
public static final boolean isArithmeticType(PType t)
This method tells if a given Type is an arithmetic type
t - The PType to be checked.
- true if the tested PType is an arithmetic type.