public Dissector getNewInstance ( ) { try { Constructor < ? extends Dissector > co = this . getClass ( ) . getConstructor ( ) ; Dissector newInstance = co . newInstance ( ) ; initializeNewInstance ( newInstance ) ; return newInstance ; } catch ( Exception e ) { LOG . error ( "Unable to create instance of {}: {}" , this . getClass ( ) . getCanonicalName ( ) , e ) ; } return null ; }
Create an additional instance of this dissector . This is needed because in the parse tree we may need the same dissector multiple times . In order to optimize per node we need separate instances .