public Object evaluate ( ) { if ( ! isCompileTimeConstant ( ) ) { return super . evaluate ( ) ; } Object lhsValue = getLHS ( ) . evaluate ( ) ; Object rhsValue = getRHS ( ) . evaluate ( ) ; IType lhsType = getLHS ( ) . getType ( ) ; IType rhsType = getRHS ( ) . getType ( ) ; if ( _strOperator . equals ( ">" ) ) { if ( BeanAccess . isNumericType ( lhsType ) ) { return compareNumbers ( lhsValue , rhsValue , lhsType , rhsType ) > 0 ; } else { if ( BeanAccess . isBeanType ( lhsType ) ) { if ( BeanAccess . isBeanType ( rhsType ) ) { if ( lhsType . isAssignableFrom ( rhsType ) ) { if ( JavaTypes . COMPARABLE ( ) . isAssignableFrom ( lhsType ) ) { //noinspection unchecked return ( ( Comparable ) lhsValue ) . compareTo ( rhsValue ) > 0 ; } } } } } } else if ( _strOperator . equals ( "<" ) ) { if ( BeanAccess . isNumericType ( lhsType ) ) { return compareNumbers ( lhsValue , rhsValue , lhsType , rhsType ) < 0 ; } else { if ( BeanAccess . isBeanType ( lhsType ) ) { if ( BeanAccess . isBeanType ( rhsType ) ) { if ( lhsType . isAssignableFrom ( rhsType ) ) { if ( JavaTypes . COMPARABLE ( ) . isAssignableFrom ( lhsType ) ) { //noinspection unchecked return ( ( Comparable ) lhsValue ) . compareTo ( rhsValue ) < 0 ; } } } } } } else if ( _strOperator . equals ( ">=" ) ) { if ( BeanAccess . isNumericType ( lhsType ) ) { return compareNumbers ( lhsValue , rhsValue , lhsType , rhsType ) >= 0 ; } else { if ( BeanAccess . isBeanType ( lhsType ) ) { if ( BeanAccess . isBeanType ( rhsType ) ) { if ( lhsType . isAssignableFrom ( rhsType ) ) { if ( JavaTypes . COMPARABLE ( ) . isAssignableFrom ( lhsType ) ) { //noinspection unchecked return ( ( Comparable ) lhsValue ) . compareTo ( rhsValue ) >= 0 ; } } } } } } else // if( _strOperator.equals( "<=" ) ) { if ( BeanAccess . isNumericType ( lhsType ) ) { return compareNumbers ( lhsValue , rhsValue , lhsType , rhsType ) <= 0 ; } else { if ( BeanAccess . isBeanType ( lhsType ) ) { if ( BeanAccess . isBeanType ( rhsType ) ) { if ( lhsType . isAssignableFrom ( rhsType ) ) { if ( JavaTypes . COMPARABLE ( ) . isAssignableFrom ( lhsType ) ) { //noinspection unchecked return ( ( Comparable ) lhsValue ) . compareTo ( rhsValue ) <= 0 ; } } } } } } throw new UnsupportedOperationException ( "Operands are not compile-time constants.\n" + "(see http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#5313)" ) ; }
Perform a relational comparison .