Class ExpressionOasisHelper


  • public final class ExpressionOasisHelper
    extends Object
    • Method Detail

      • hasNumericType

        public static boolean hasNumericType​(ValueObject valueObject)
        Gets whether the given value object has a numeric type.
        This method call is equivalent to (in case no exception occurs) calling isNumericType(valueObject.getValueType()).
        Parameters:
        valueObject - A ValueObject.
        Returns:
        true if the given value object has a numeric type, false otherwise.
        Throws:
        NullPointerException - In case the passed value object is null.
        See Also:
        isNumericType(Type)
      • typesEqual

        public static boolean typesEqual​(Type first,
                                         Type second)
        Convenience method to check whether the given two type instances are equal.
        Parameters:
        first - A Type instance.
        second - A Type instance.
        Returns:
        true if both type instances are equal, otherwise false.
        Throws:
        NullPointerException - In case either of the passed types is null.
      • assertCorrectExpressionContext

        public static void assertCorrectExpressionContext​(ExpressionContext expressionContext,
                                                          Class<?> assertingClass)
        Asserts that the given expression context instance is a CustomExpressionContext instance.
        Parameters:
        expressionContext - The ExpressionContext to check.
        assertingClass - The Class of the object which is calling this method.
        This parameter is only used to construct a message if the passed expression context has the wrong type.
        Throws:
        AssertionError - In case the given expression context is not a CustomExpressionContext instance.