private boolean isWrapper ( Class < ? > cls ) { if ( null == cls ) return false ; if ( Boolean . class . isAssignableFrom ( cls ) ) switch ( kind ) { case EQ : case NE : case BOOL_OR : case BOOL_ORX : case BOOL_AND : case BOOL_ANDX : case BIT_AND : case BIT_ANDX : case BIT_OR : case BIT_ORX : case XOR : case XORX : return true ; default : return false ; } if ( Character . class . isAssignableFrom ( cls ) || Number . class . isAssignableFrom ( cls ) ) switch ( kind ) { case BOOL_AND : case BOOL_ANDX : case BOOL_OR : case BOOL_ORX : return false ; default : return true ; } return false ; }
Is the class a wrapper type . Also apply valid operator type to response .