Java 类javax.servlet.jsp.tagext.IterationTag 实例源码

项目:lazycat    文件:Node.java   
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);
}
项目:Telepathology    文件:AbstractArtifactSourceCollectionTag.java   
@Override
   public int doAfterBody() 
throws JspException
   {
    if(artifactSourceIterator.hasNext())
    {
        currentResolvedArtifactSource = artifactSourceIterator.next();
        currentArtifactSource = currentResolvedArtifactSource.getArtifactSource();
        return IterationTag.EVAL_BODY_AGAIN;
    }
    else
    {
        currentResolvedArtifactSource = null;
        currentArtifactSource = null;
        return IterationTag.SKIP_BODY;
    }
   }
项目:mayaa    文件:JspProcessor.java   
protected ProcessStatus getProcessStatus(int status, boolean doStart) {
    if (status == Tag.EVAL_BODY_INCLUDE) {
        return _forceBodySkip
                ? ProcessStatus.SKIP_BODY
                : ProcessStatus.EVAL_BODY_INCLUDE;
    } else if (status == Tag.SKIP_BODY) {
        return ProcessStatus.SKIP_BODY;
    } else if (status == Tag.EVAL_PAGE) {
        return ProcessStatus.EVAL_PAGE;
    } else if (status == Tag.SKIP_PAGE) {
        return ProcessStatus.SKIP_PAGE;
    } else if (!doStart && status == IterationTag.EVAL_BODY_AGAIN) {
        return ProcessStatus.EVAL_BODY_AGAIN;
    } else if (doStart && status == BodyTag.EVAL_BODY_BUFFERED) {
        return _forceBodySkip
                ? ProcessStatus.SKIP_BODY
                : ProcessStatus.EVAL_BODY_BUFFERED;
    }
    throw new IllegalArgumentException();
}
项目:tomcat7    文件:Node.java   
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);
}
项目:lams    文件:Node.java   
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);
}
项目:apache-tomcat-7.0.73-with-comment    文件:Node.java   
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);
}
项目:packagedrone    文件:Node.java   
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);
}
项目:Telepathology    文件:EnumIteratorTag.java   
@Override
   public int doAfterBody() 
throws JspException
   {
    ++index;
    return isAppendAllElement() ? 
        index <= values.length ? IterationTag.EVAL_BODY_AGAIN : Tag.SKIP_BODY :
        index < values.length ? IterationTag.EVAL_BODY_AGAIN : Tag.SKIP_BODY;
   }
项目:Telepathology    文件:WellKnownOIDIteratorTag.java   
@Override
   public int doAfterBody() 
throws JspException
   {
    ++index;
    return index < values.length ? IterationTag.EVAL_BODY_AGAIN : Tag.SKIP_BODY;
   }
项目:Telepathology    文件:AbstractPatientListTag.java   
@Override
   public int doAfterBody() 
throws JspException
   {
    if( patientIterator.hasNext() )
    {
        currentPatient = patientIterator.next();
        return IterationTag.EVAL_BODY_AGAIN;
    }
    else
    {
        currentPatient = null;
        return IterationTag.SKIP_BODY;
    }
   }
项目:Telepathology    文件:AbstractJavaLogCollectionTag.java   
@Override
   public int doAfterBody() 
throws JspException
   {
    if(fileIterator.hasNext())
    {
        currentFile = fileIterator.next();
        return IterationTag.EVAL_BODY_AGAIN;
    }
    else
    {
        currentFile = null;
        return IterationTag.SKIP_BODY;
    }
   }
项目:Telepathology    文件:AbstractResolvedArtifactSourceCollectionTag.java   
@Override
   public int doAfterBody() 
throws JspException
   {
    if(resolvedArtifactSourceIterator.hasNext())
    {
        currentResolvedArtifactSource = resolvedArtifactSourceIterator.next();
        return IterationTag.EVAL_BODY_AGAIN;
    }
    else
    {
        currentResolvedArtifactSource = null;
        return IterationTag.SKIP_BODY;
    }
   }
项目:Telepathology    文件:AbstractSiteCollectionTag.java   
@Override
   public int doAfterBody() 
throws JspException
   {
    if(siteIterator.hasNext())
    {
        currentSite = siteIterator.next();
        return IterationTag.EVAL_BODY_AGAIN;
    }
    else
    {
        currentSite = null;
        return IterationTag.SKIP_BODY;
    }
   }
项目:Telepathology    文件:AbstractUrlCollectionTag.java   
@Override
   public int doAfterBody() 
throws JspException
   {
    if(urlIterator.hasNext())
    {
        currentUrl = urlIterator.next();
        return IterationTag.EVAL_BODY_AGAIN;
    }
    else
    {
        currentUrl = null;
        return IterationTag.SKIP_BODY;
    }
   }
项目:Telepathology    文件:AbstractBusinessObjectCollectionTag.java   
@Override
   public int doAfterBody() 
throws JspException
   {
    Iterator<T> boIterator = getBusinessObjectCollectionIterator();
    if( boIterator != null && boIterator.hasNext() )
    {
        currentBusinessObject = boIterator.next();
        return IterationTag.EVAL_BODY_AGAIN;
    }
    currentBusinessObject = null;
    return BodyTag.SKIP_BODY;
   }
项目:ServletStudyDemo    文件:TagDemo3.java   
@Override
public int doAfterBody() throws JspException {
    // TODO Auto-generated method stub
    x--;
    if(x>0){
        return IterationTag.EVAL_BODY_AGAIN;
    }else{
        return IterationTag.SKIP_BODY;
    }
}
项目:Lucee4    文件:TagHelper.java   
private static void doTry(BytecodeContext bc, GeneratorAdapter adapter, Tag tag, int currLocal, Type currType) throws BytecodeException {
    Label beginDoWhile=new Label();
    adapter.visitLabel(beginDoWhile);
        bc.setCurrentTag(currLocal);
        tag.getBody().writeOut(bc);

    // while (tag.doAfterBody()==BodyTag.EVAL_BODY_AGAIN);
        adapter.loadLocal(currLocal);
        adapter.invokeVirtual(currType, DO_AFTER_BODY);
        adapter.push(IterationTag.EVAL_BODY_AGAIN);
    adapter.visitJumpInsn(Opcodes.IF_ICMPEQ, beginDoWhile);
}
项目:Lucee    文件:TagHelper.java   
private static void doTry(BytecodeContext bc, GeneratorAdapter adapter, Tag tag, int currLocal, Type currType, boolean interf) throws TransformerException {
    Label beginDoWhile=new Label();
    adapter.visitLabel(beginDoWhile);
        bc.setCurrentTag(currLocal);
        tag.getBody().writeOut(bc);

    // while (tag.doAfterBody()==BodyTag.EVAL_BODY_AGAIN);
        adapter.loadLocal(currLocal);
        if(interf)adapter.checkCast(Types.BODY_TAG);
        ASMUtil.invoke(interf?ASMUtil.INTERFACE:ASMUtil.VIRTUAL,adapter,currType,DO_AFTER_BODY);
        //adapter.invokeVirtual(currType, DO_AFTER_BODY);
        adapter.push(IterationTag.EVAL_BODY_AGAIN);
    adapter.visitJumpInsn(Opcodes.IF_ICMPEQ, beginDoWhile);
}
项目:class-guard    文件:Node.java   
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);
}
项目:package-drone    文件:Node.java   
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);
}
项目:apache-tomcat-7.0.57    文件:Node.java   
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);
}
项目:apache-tomcat-7.0.57    文件:Node.java   
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);
}
项目:WBSAirback    文件:Node.java   
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);
}
项目:mayaa    文件:JspProcessor.java   
public ProcessStatus doAfterChildProcess() {
    Tag tag = getLoadedTag();
    if (tag instanceof IterationTag) {
        IterationTag iterationTag = (IterationTag) tag;
        try {
            int ret = iterationTag.doAfterBody();
            return getProcessStatus(ret, false);
        } catch (JspException e) {
            throw createJspRuntimeException(
                    getOriginalNode(), getInjectedNode(), e);
        }
    }
    throw new IllegalStateException();
}
项目:Telepathology    文件:AbstractSeriesCollectionTag.java   
@Override
   public int doAfterBody() 
throws JspException
   {
    return getSeriesIterator().hasNext() ? IterationTag.EVAL_BODY_AGAIN : IterationTag.SKIP_BODY;
   }
项目:Telepathology    文件:AbstractImageCollectionTag.java   
@Override
   public int doAfterBody() 
throws JspException
   {
    return getImageIterator().hasNext() ? IterationTag.EVAL_BODY_AGAIN : IterationTag.SKIP_BODY;
   }
项目:mayaa    文件:JspProcessor.java   
public boolean isIteration() {
    return getLoadedTag() instanceof IterationTag;
}