001/* 002 * Copyright (c) 2014, Victor Nazarov <asviraspossible@gmail.com> 003 * All rights reserved. 004 * 005 * Redistribution and use in source and binary forms, with or without modification, 006 * are permitted provided that the following conditions are met: 007 * 008 * 1. Redistributions of source code must retain the above copyright notice, 009 * this list of conditions and the following disclaimer. 010 * 011 * 2. Redistributions in binary form must reproduce the above copyright notice, 012 * this list of conditions and the following disclaimer in the documentation and/or 013 * other materials provided with the distribution. 014 * 015 * 3. Neither the name of the copyright holder nor the names of its contributors 016 * may be used to endorse or promote products derived from this software 017 * without specific prior written permission. 018 * 019 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 020 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 021 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 022 * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 023 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 024 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 025 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 026 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 027 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 028 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 029 */ 030package io.jstach.jstachio.escapers; 031 032import io.jstach.jstache.JStacheContentType; 033import io.jstach.jstachio.Escaper; 034 035/** 036 * Provides NOOP escaper for working with plain text. 037 * 038 * @author Victor Nazarov 039 * @author agentgt 040 */ 041@JStacheContentType(mediaType = "text/plain") 042public final class PlainText { 043 044 private PlainText() { 045 } 046 047 /** 048 * Provides the escaper for static lookup. 049 * @return noop like escaper singleton 050 */ 051 public static Escaper provider() { 052 return NoEscaper.PLAIN_TEXT; 053 } 054 055 /** 056 * Provides the escaper for static lookup. 057 * @return noop like escaper singleton 058 */ 059 public static Escaper of() { 060 return NoEscaper.PLAIN_TEXT; 061 } 062 063}