org.apache.jasper.Options.getTrimSpaces()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(6.9k)|赞(0)|评价(0)|浏览(100)

本文整理了Java中org.apache.jasper.Options.getTrimSpaces()方法的一些代码示例,展示了Options.getTrimSpaces()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Options.getTrimSpaces()方法的具体详情如下:
包路径:org.apache.jasper.Options
类名称:Options
方法名:getTrimSpaces

Options.getTrimSpaces介绍

暂无

代码示例

代码示例来源:origin: net.sf.jsptest/jsptest-jsp20

public boolean getTrimSpaces() {
  return options.getTrimSpaces();
}

代码示例来源:origin: com.github.lkoskela.jsptest/jsptest-jsp20

public boolean getTrimSpaces() {
  return options.getTrimSpaces();
}

代码示例来源:origin: io.undertow.jastow/jastow

@Override
public void visit(Node.TemplateText n) throws JasperException {
  if ((options.getTrimSpaces() || pageInfo.isTrimDirectiveWhitespaces())
      && n.isAllSpace()) {
    n.setText(EMPTY_TEXT);
    return;
  }
  if (textNodeCount++ == 0) {
    firstTextNode = n;
    textBuffer = new StringBuilder(n.getText());
  } else {
    // Append text to text buffer
    textBuffer.append(n.getText());
    n.setText(EMPTY_TEXT);
  }
}

代码示例来源:origin: org.apache.tomcat/tomcat-jasper

@Override
public void visit(Node.TemplateText n) throws JasperException {
  if (n.isAllSpace()) {
    if ((options.getTrimSpaces() == TrimSpacesOption.TRUE ||
        pageInfo.isTrimDirectiveWhitespaces())) {
      n.setText(EMPTY_TEXT);
      return;
    } else if (options.getTrimSpaces() == TrimSpacesOption.SINGLE) {
      n.setText(SINGLE_SPACE);
      return;
    }
  }
  if (textNodeCount++ == 0) {
    firstTextNode = n;
    textBuffer = new StringBuilder(n.getText());
  } else {
    // Append text to text buffer
    textBuffer.append(n.getText());
    n.setText(EMPTY_TEXT);
  }
}

代码示例来源:origin: jboss.web/jbossweb

public void visit(Node.TemplateText n) throws JasperException {
  if ((options.getTrimSpaces() || pageInfo.isTrimDirectiveWhitespaces()) 
      && n.isAllSpace()) {
    n.setText(emptyText);
    return;
  }
  if (textNodeCount++ == 0) {
    firstTextNode = n;
    textBuffer = new StringBuilder(n.getText());
  } else {
    // Append text to text buffer
    textBuffer.append(n.getText());
    n.setText(emptyText);
  }
}

代码示例来源:origin: codefollower/Tomcat-Research

@Override
public void visit(Node.TemplateText n) throws JasperException {
  if ((options.getTrimSpaces() || pageInfo.isTrimDirectiveWhitespaces())
      && n.isAllSpace()) {
    n.setText(EMPTY_TEXT);
    return;
  }
  if (textNodeCount++ == 0) {
    firstTextNode = n;
    textBuffer = new StringBuilder(n.getText());
  } else {
    // Append text to text buffer
    textBuffer.append(n.getText());
    n.setText(EMPTY_TEXT);
  }
}

代码示例来源:origin: org.apache.geronimo.ext.tomcat/jasper

@Override
public void visit(Node.TemplateText n) throws JasperException {
  if ((options.getTrimSpaces() || pageInfo.isTrimDirectiveWhitespaces()) 
      && n.isAllSpace()) {
    n.setText(EMPTY_TEXT);
    return;
  }
  if (textNodeCount++ == 0) {
    firstTextNode = n;
    textBuffer = new StringBuilder(n.getText());
  } else {
    // Append text to text buffer
    textBuffer.append(n.getText());
    n.setText(EMPTY_TEXT);
  }
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

@Override
public void visit(Node.TemplateText n) throws JasperException {
  if ((options.getTrimSpaces() || pageInfo.isTrimDirectiveWhitespaces()) 
      && n.isAllSpace()) {
    n.setText(emptyText);
    return;
  }
  if (textNodeCount++ == 0) {
    firstTextNode = n;
    textBuffer = new StringBuilder(n.getText());
  } else {
    // Append text to text buffer
    textBuffer.append(n.getText());
    n.setText(emptyText);
  }
}

代码示例来源:origin: org.bluestemsoftware.open.maven.tparty/jsp-2.1

public void visit(Node.TemplateText n) throws JasperException {
  if (( options.getTrimSpaces() ||
       pageInfo.isTrimDirectiveWhitespaces()) &&
     n.isAllSpace()) {
    n.setText(emptyText);
    return;
  }
  if (textNodeCount++ == 0) {
    firstTextNode = n;
    textBuffer = new StringBuffer(n.getText());
  } else {
    // Append text to text buffer
    textBuffer.append(n.getText());
    n.setText(emptyText);
  }
}

代码示例来源:origin: org.jboss.web/jbossweb

public void visit(Node.TemplateText n) throws JasperException {
  if ((options.getTrimSpaces() || pageInfo.isTrimDirectiveWhitespaces()) 
      && n.isAllSpace()) {
    n.setText(emptyText);
    return;
  }
  if (textNodeCount++ == 0) {
    firstTextNode = n;
    textBuffer = new StringBuilder(n.getText());
  } else {
    // Append text to text buffer
    textBuffer.append(n.getText());
    n.setText(emptyText);
  }
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.apache.jasper.glassfish

public static void concatenate(Compiler compiler, Node.Nodes page)
      throws JasperException {

    Options options = compiler.getCompilationContext().getOptions();
    PageInfo pageInfo = compiler.getPageInfo();
    boolean trim =
      options.getTrimSpaces() || pageInfo.isTrimDirectiveWhitespaces();

    if (trim) {
      TextCatVisitor v = new TextCatVisitor(true, trim);
      page.visit(v);
      v.collectText();
    }
    TextCatVisitor v = new TextCatVisitor(false, trim);
    page.visit(v);

  // Cleanup, in case the page ends with a template text
    v.collectText();
  }
}

代码示例来源:origin: org.glassfish.web/jakarta.servlet.jsp

public static void concatenate(Compiler compiler, Node.Nodes page)
      throws JasperException {

    Options options = compiler.getCompilationContext().getOptions();
    PageInfo pageInfo = compiler.getPageInfo();
    boolean trim =
      options.getTrimSpaces() || pageInfo.isTrimDirectiveWhitespaces();

    if (trim) {
      TextCatVisitor v = new TextCatVisitor(true, trim);
      page.visit(v);
      v.collectText();
    }
    TextCatVisitor v = new TextCatVisitor(false, trim);
    page.visit(v);

  // Cleanup, in case the page ends with a template text
    v.collectText();
  }
}

代码示例来源:origin: org.glassfish.web/javax.servlet.jsp

public static void concatenate(Compiler compiler, Node.Nodes page)
      throws JasperException {

    Options options = compiler.getCompilationContext().getOptions();
    PageInfo pageInfo = compiler.getPageInfo();
    boolean trim =
      options.getTrimSpaces() || pageInfo.isTrimDirectiveWhitespaces();

    if (trim) {
      TextCatVisitor v = new TextCatVisitor(true, trim);
      page.visit(v);
      v.collectText();
    }
    TextCatVisitor v = new TextCatVisitor(false, trim);
    page.visit(v);

  // Cleanup, in case the page ends with a template text
    v.collectText();
  }
}

代码示例来源:origin: org.eclipse.jetty.orbit/org.apache.jasper.glassfish

public static void concatenate(Compiler compiler, Node.Nodes page)
      throws JasperException {

    Options options = compiler.getCompilationContext().getOptions();
    PageInfo pageInfo = compiler.getPageInfo();
    boolean trim =
      options.getTrimSpaces() || pageInfo.isTrimDirectiveWhitespaces();

    if (trim) {
      TextCatVisitor v = new TextCatVisitor(true, trim);
      page.visit(v);
      v.collectText();
    }
    TextCatVisitor v = new TextCatVisitor(false, trim);
    page.visit(v);

  // Cleanup, in case the page ends with a template text
    v.collectText();
  }
}

代码示例来源:origin: org.glassfish.web/jsp-impl

public static void concatenate(Compiler compiler, Node.Nodes page)
      throws JasperException {

    Options options = compiler.getCompilationContext().getOptions();
    PageInfo pageInfo = compiler.getPageInfo();
    boolean trim =
      options.getTrimSpaces() || pageInfo.isTrimDirectiveWhitespaces();

    if (trim) {
      TextCatVisitor v = new TextCatVisitor(true, trim);
      page.visit(v);
      v.collectText();
    }
    TextCatVisitor v = new TextCatVisitor(false, trim);
    page.visit(v);

  // Cleanup, in case the page ends with a template text
    v.collectText();
  }
}

代码示例来源:origin: org.eclipse.jetty.toolchain/jetty-jsp-fragment

public static void concatenate(Compiler compiler, Node.Nodes page)
      throws JasperException {

    Options options = compiler.getCompilationContext().getOptions();
    PageInfo pageInfo = compiler.getPageInfo();
    boolean trim =
      options.getTrimSpaces() || pageInfo.isTrimDirectiveWhitespaces();

    if (trim) {
      TextCatVisitor v = new TextCatVisitor(true, trim);
      page.visit(v);
      v.collectText();
    }
    TextCatVisitor v = new TextCatVisitor(false, trim);
    page.visit(v);

  // Cleanup, in case the page ends with a template text
    v.collectText();
  }
}

相关文章

微信公众号

最新文章

更多