⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 blockextractingrule.java

📁 OS(OpenSymphony)的SiteMesh是一个用来在JSP中实现页面布局和装饰(layout and decoration)的框架组件
💻 JAVA
字号:
package com.opensymphony.module.sitemesh.html;import com.opensymphony.module.sitemesh.html.util.CharArray;public abstract class BlockExtractingRule extends BasicRule {    private boolean includeEnclosingTags;    // we should only handle tags that have been opened previously.    // else the parser throws a NoSuchElementException (SIM-216)    private boolean seenOpeningTag;    protected BlockExtractingRule(boolean includeEnclosingTags, String acceptableTagName) {        super(acceptableTagName);        this.includeEnclosingTags = includeEnclosingTags;    }    protected BlockExtractingRule(boolean includeEnclosingTags) {        this.includeEnclosingTags = includeEnclosingTags;    }    public void process(Tag tag) {        if (tag.getType() == Tag.OPEN) {            if (includeEnclosingTags) {                tag.writeTo(context.currentBuffer());            }            context.pushBuffer(createBuffer());            start(tag);            seenOpeningTag = true;        } else if (tag.getType() == Tag.CLOSE && seenOpeningTag) {            end(tag);            context.popBuffer();            if (includeEnclosingTags) {                tag.writeTo(context.currentBuffer());            }        }    }    protected void start(Tag tag) {    }    protected void end(Tag tag) {    }    protected CharArray createBuffer() {        return new CharArray(512);    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -