public Object read ( Object object ) { if ( object == null ) { String msg = "Can not evaluate the identifier \"" + _identifier + "\" on a null object." ; LOGGER . error ( msg ) ; throw new RuntimeException ( msg ) ; } if ( TRACE_ENABLED ) LOGGER . trace ( "Read property " + _identifier + " on object of type " + object . getClass ( ) . getName ( ) ) ; if ( object instanceof Map ) return mapLookup ( ( Map ) object , _identifier ) ; else if ( object instanceof List ) { int i = parseIndex ( _identifier ) ; return listLookup ( ( List ) object , i ) ; } else if ( object . getClass ( ) . isArray ( ) ) { int i = parseIndex ( _identifier ) ; return arrayLookup ( object , i ) ; } else return beanLookup ( object , _identifier ) ; }
Read the object represetned by this token from the given object .