public static boolean isTrue ( Expression expression ) { if ( expression == null ) { return false ; } if ( expression instanceof PropertyExpression && classNodeImplementsType ( ( ( PropertyExpression ) expression ) . getObjectExpression ( ) . getType ( ) , Boolean . class ) ) { if ( ( ( PropertyExpression ) expression ) . getProperty ( ) instanceof ConstantExpression && "TRUE" . equals ( ( ( ConstantExpression ) ( ( PropertyExpression ) expression ) . getProperty ( ) ) . getValue ( ) ) ) { return true ; } } return ( ( expression instanceof ConstantExpression ) && ( ( ConstantExpression ) expression ) . isTrueExpression ( ) ) || "Boolean.TRUE" . equals ( expression . getText ( ) ) ; }
Tells you if the expression is true which can be true or Boolean . TRUE .