private Object lookup(String key,Class type) throws SAXException {
  Object value;
  if (_handler != null) {
    if (_handler.hasVariable(key)) {
      return checkCast(_handler.getVariable(key),type);
    }
  }
  value=_mapping.get(key);
  if (value == null) {
    throw new SAXException("ID " + key + " has not been defined");
  }
  return checkCast(value,type);
}

private Object lookup ( String key , Class type ) throws SAXException { Object value ; if ( _handler != null ) { if ( _handler . hasVariable ( key ) ) { return checkCast ( _handler . getVariable ( key ) , type ) ; } } value = _mapping . get ( key ) ; if ( value == null ) { throw new SAXException ( "ID " + key + " has not been defined" ) ; } return checkCast ( value , type ) ; }
returns an object created with id = key . if the object is not of type type , this will throw an exception .
