public < T extends JspTag > JspTag get ( Class < T > handlerClass ) throws JspException { synchronized ( this ) { if ( current >= 0 ) { return handlers [ current -- ] ; } } // Out of sync block - there is no need for other threads to // wait for us to construct a tag for this thread. JspTag tagHandler = null ; try { if ( resourceInjector != null ) { tagHandler = resourceInjector . createTagHandlerInstance ( handlerClass ) ; } else { tagHandler = handlerClass . newInstance ( ) ; } } catch ( Exception e ) { throw new JspException ( e . getMessage ( ) , e ) ; } return tagHandler ; }
Gets the next available tag handler from this tag handler pool instantiating one if this tag handler pool is empty .