public void setHandler ( Object handler ) { if ( handler instanceof ContentHandler ) setContentHandler ( ( ContentHandler ) handler ) ; if ( handler instanceof EntityResolver ) setEntityResolver ( ( EntityResolver ) handler ) ; if ( handler instanceof ErrorHandler ) setErrorHandler ( ( ErrorHandler ) handler ) ; if ( handler instanceof DTDHandler ) setDTDHandler ( ( DTDHandler ) handler ) ; if ( handler instanceof LexicalHandler ) setLexicalHandler ( ( LexicalHandler ) handler ) ; if ( handler instanceof DeclHandler ) setDeclHandler ( ( DeclHandler ) handler ) ; }
Registers given handler with all its implementing interfaces . This would be handy if you want to register to all interfaces implemented by given handler object