public class EscapeCharacterHandler
extends java.lang.Object
Copyright (C) 2012-2014 JIOWA Business Solutions GmbH, Bettinastr. 30 , 60325 Frankfurt am Main, Germany
Homepage: www.jiowa.de
All rights reserved.
Download: www.jiowa.de/download.html
License: www.jiowa.de/license.html
Modifier and Type | Field and Description |
---|---|
protected TemplateContext |
context
the given template context
|
Constructor and Description |
---|
EscapeCharacterHandler(TemplateContext context)
Creates a quoting handler for the given template context.
|
Modifier and Type | Method and Description |
---|---|
int |
indexOfFirstNonQuotedTokenAppearance(java.lang.StringBuffer buf,
int counter,
java.lang.String token)
Returns the index of the the first non-quoted token occurrence.
|
int |
indexOfFirstNonQuotedTokenAppearance(java.lang.StringBuffer buf,
int counter,
Token token)
Returns the index of the the first non-quoted token occurrence.
|
boolean |
isQuoted(java.lang.StringBuffer buf,
int tokenPos)
Returns true if the character of the given textposition is quoted.
|
protected com.jiowa.util.tuple.Tuple<java.lang.StringBuffer,java.lang.Integer> |
removeQuotes(java.lang.StringBuffer buf,
int tokenPos)
Removes the quotes
|
java.lang.String |
removeQuotesForTagStartTokensAndBrackets(java.lang.String s)
Removes all quotes for tag start tokens and for all brackets.
|
protected java.lang.StringBuffer |
removeQuotesForToken(java.lang.StringBuffer buf,
java.lang.String token)
Removes the quotes for a given token within a stringbuffer.
|
protected TemplateContext context
public EscapeCharacterHandler(TemplateContext context)
context
- the template contextpublic boolean isQuoted(java.lang.StringBuffer buf, int tokenPos)
buf
- text container to be investigatedtokenPos
- textposition of token to be investigatedpublic int indexOfFirstNonQuotedTokenAppearance(java.lang.StringBuffer buf, int counter, Token token)
buf
- text countercounter
- position countertoken
- token to be foundpublic int indexOfFirstNonQuotedTokenAppearance(java.lang.StringBuffer buf, int counter, java.lang.String token)
buf
- text countercounter
- position countertoken
- token to be foundpublic java.lang.String removeQuotesForTagStartTokensAndBrackets(java.lang.String s)
s
- text stringprotected java.lang.StringBuffer removeQuotesForToken(java.lang.StringBuffer buf, java.lang.String token)
buf
- the buffertoken
- the tokenprotected com.jiowa.util.tuple.Tuple<java.lang.StringBuffer,java.lang.Integer> removeQuotes(java.lang.StringBuffer buf, int tokenPos)
buf
- text containertokenPos
- text position of token