Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/**
* Copyright (c) 2012-2015 Edgar Espina
*
* This file is part of Handlebars.java.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.jknack.handlebars.internal;
import java.io.IOException;
import java.io.Writer;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import com.github.jknack.handlebars.Context;
import com.github.jknack.handlebars.EscapingStrategy;
import com.github.jknack.handlebars.Formatter;
import com.github.jknack.handlebars.Handlebars;
import com.github.jknack.handlebars.Helper;
import com.github.jknack.handlebars.HelperRegistry;
import com.github.jknack.handlebars.Lambda;
import com.github.jknack.handlebars.Options;
import com.github.jknack.handlebars.PathCompiler;
import com.github.jknack.handlebars.PathExpression;
import com.github.jknack.handlebars.TagType;
import com.github.jknack.handlebars.Template;
/**
* The most basic tag type is the variable. A {{name}} tag in a basic template
* will try to find the name key in the current context. If there is no name
* key, nothing will be rendered.
* All variables are HTML escaped by default. If you want to return unescaped
* HTML, use the triple mustache: {{{name}}}.
* You can also use & to unescape a variable: {{& name}}. This may be useful
* when changing delimiters.
*
* @author edgar.espina
* @since 0.1.0
*/
class Variable extends HelperResolver {
/**
* The variable's name. Required.
*/
protected final String name;
/**
* The variable type.
*/
protected final TagType type;
/**
* The start delimiter.
*/
private String startDelimiter;
/**
* The end delimiter.
*/
private String endDelimiter;
/**
* The escaping strategy.
*/
private EscapingStrategy escapingStrategy;
/** Helper. */
private Helper