public CustomTag(String qName, String prefix, String localName, String uri, Attributes attrs, Attributes nonTaglibXmlnsAttrs, Attributes taglibAttrs, Mark start, Node parent, TagInfo tagInfo, Class<?> tagHandlerClass) { super(qName, localName, attrs, nonTaglibXmlnsAttrs, taglibAttrs, start, parent); this.uri = uri; this.prefix = prefix; this.tagInfo = tagInfo; this.tagHandlerClass = tagHandlerClass; this.customNestingLevel = makeCustomNestingLevel(); this.childInfo = new ChildInfo(); this.implementsIterationTag = IterationTag.class.isAssignableFrom(tagHandlerClass); this.implementsBodyTag = BodyTag.class.isAssignableFrom(tagHandlerClass); this.implementsTryCatchFinally = TryCatchFinally.class.isAssignableFrom(tagHandlerClass); this.implementsSimpleTag = SimpleTag.class.isAssignableFrom(tagHandlerClass); this.implementsDynamicAttributes = DynamicAttributes.class.isAssignableFrom(tagHandlerClass); this.implementsJspIdConsumer = JspIdConsumer.class.isAssignableFrom(tagHandlerClass); }
public CustomTag(String qName, String prefix, String localName, String uri, Attributes attrs, Attributes nonTaglibXmlnsAttrs, Attributes taglibAttrs, Mark start, Node parent, TagInfo tagInfo, Class<?> tagHandlerClass) { super(qName, localName, attrs, nonTaglibXmlnsAttrs, taglibAttrs, start, parent); this.uri = uri; this.prefix = prefix; this.tagInfo = tagInfo; this.tagHandlerClass = tagHandlerClass; this.customNestingLevel = makeCustomNestingLevel(); this.childInfo = new ChildInfo(); this.implementsIterationTag = IterationTag.class .isAssignableFrom(tagHandlerClass); this.implementsBodyTag = BodyTag.class .isAssignableFrom(tagHandlerClass); this.implementsTryCatchFinally = TryCatchFinally.class .isAssignableFrom(tagHandlerClass); this.implementsSimpleTag = SimpleTag.class .isAssignableFrom(tagHandlerClass); this.implementsDynamicAttributes = DynamicAttributes.class .isAssignableFrom(tagHandlerClass); this.implementsJspIdConsumer = JspIdConsumer.class .isAssignableFrom(tagHandlerClass); }
public CustomTag(String qName, String prefix, String localName, String uri, Attributes attrs, Attributes nonTaglibXmlnsAttrs, Attributes taglibAttrs, Mark start, Node parent, TagInfo tagInfo, Class tagHandlerClass) { super(qName, localName, attrs, nonTaglibXmlnsAttrs, taglibAttrs, start, parent); this.uri = uri; this.prefix = prefix; this.tagInfo = tagInfo; this.tagHandlerClass = tagHandlerClass; this.customNestingLevel = makeCustomNestingLevel(); this.childInfo = new ChildInfo(); this.implementsIterationTag = IterationTag.class .isAssignableFrom(tagHandlerClass); this.implementsBodyTag = BodyTag.class .isAssignableFrom(tagHandlerClass); this.implementsTryCatchFinally = TryCatchFinally.class .isAssignableFrom(tagHandlerClass); this.implementsSimpleTag = SimpleTag.class .isAssignableFrom(tagHandlerClass); this.implementsDynamicAttributes = DynamicAttributes.class .isAssignableFrom(tagHandlerClass); this.implementsJspIdConsumer = JspIdConsumer.class .isAssignableFrom(tagHandlerClass); }
public CustomTag(String jspVersion, String qName, String prefix, String localName, String uri, Attributes attrs, Attributes nonTaglibXmlnsAttrs, Attributes taglibAttrs, Mark start, Node parent, TagInfo tagInfo, Class tagHandlerClass) { super(qName, localName, attrs, nonTaglibXmlnsAttrs, taglibAttrs, start, parent); this.jspVersion = Double.valueOf(jspVersion).doubleValue(); this.uri = uri; this.prefix = prefix; this.tagInfo = tagInfo; this.tagHandlerClass = tagHandlerClass; this.customNestingLevel = makeCustomNestingLevel(); this.childInfo = new ChildInfo(); this.implementsIterationTag = IterationTag.class.isAssignableFrom(tagHandlerClass); this.implementsBodyTag = BodyTag.class.isAssignableFrom(tagHandlerClass); this.implementsTryCatchFinally = TryCatchFinally.class.isAssignableFrom(tagHandlerClass); this.implementsSimpleTag = SimpleTag.class.isAssignableFrom(tagHandlerClass); this.implementsDynamicAttributes = DynamicAttributes.class.isAssignableFrom(tagHandlerClass); }
@Override public void releaseBody(BodyTag bodyTag, int state) { if(bodyTag instanceof TryCatchFinally) { ((TryCatchFinally)bodyTag).doFinally(); } if (state != Tag.EVAL_BODY_INCLUDE)popBody(); }
/** * Handles {@link TryCatchFinally} implementations. * * @param t * Caught exception */ public void doCatch(Throwable t) throws Throwable { T target = getTargetBean(); if (target instanceof TryCatchFinally) { TryCatchFinally tcf = (TryCatchFinally) target; tcf.doCatch(t); } else { throw t; } }
/** * Handles {@link TryCatchFinally} implementations. */ public void doFinally() { T target = getTargetBean(); if (target instanceof TryCatchFinally) { TryCatchFinally tcf = (TryCatchFinally) target; tcf.doFinally(); } }
public boolean canCatch() { try { return getLoadedTag() instanceof TryCatchFinally; } catch (Exception e) { return false; } }
public void doFinallyProcess() { Tag tag = getLoadedTag(); if (tag instanceof TryCatchFinally) { TryCatchFinally tryCatch = (TryCatchFinally) tag; try { tryCatch.doFinally(); } finally { releaseLoadedTag(); } } else { throw new IllegalStateException(); } }