static int objectType ( Object value ) { if ( value instanceof String ) return STRING ; else if ( value instanceof Boolean ) // was BooleanValue return BOOLEAN ; else if ( value instanceof Number ) //was NumericValue // NumericValue types are ordered INT..DOUBLE starting at zero. Selector types are // ordered INT..DOUBLE starting at Selector.INT. return EvaluatorImpl . getType ( ( Number ) value ) + Selector . INT ; // was ((NumericValue) value).type() else if ( value instanceof Serializable ) return OBJECT ; else return INVALID ; }
Determine Selector type code of a Literal value according to its class . Used by the Literal constructor and by the Evaluator