private final Object typeCheck ( Object value , int type ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "typecheck: value = " + value + ", " + value . getClass ( ) + " , type=" + type ) ; switch ( type ) { /* No checking, just return the value */ case Selector . UNKNOWN : return value ; /* STRING - simple! */ case Selector . STRING : return ( value instanceof String ) ? value : null ; /* BOOLEAN - Boolean or BooleanValue are suitable */ case Selector . BOOLEAN : return ( value instanceof Boolean ) ? value : null ; /* Any numeric - any Number or a NumericValue are suitable */ default : return ( value instanceof Number ) ? value : null ; } }
Check the type of the value obtained from the message .