Package edu.umd.cs.findbugs.xml
Class QuoteMetaCharacters
- java.lang.Object
-
- edu.umd.cs.findbugs.xml.QuoteMetaCharacters
-
public abstract class QuoteMetaCharacters extends java.lang.ObjectQuote metacharacters in a String.- See Also:
MetaCharacterMap
-
-
Field Summary
Fields Modifier and Type Field Description private MetaCharacterMapmapprivate java.lang.Stringtext
-
Constructor Summary
Constructors Modifier Constructor Description protectedQuoteMetaCharacters(java.lang.String text, MetaCharacterMap map)Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidemitLiteral(java.lang.String s)Downcall method to emit literal text, in which any occurrences of the metacharacters are quoted.private intfindNextMeta(java.lang.String s, int start)voidprocess()Quote metacharacters in the text.
-
-
-
Field Detail
-
text
private final java.lang.String text
-
map
private final MetaCharacterMap map
-
-
Constructor Detail
-
QuoteMetaCharacters
protected QuoteMetaCharacters(@Nonnull java.lang.String text, @Nonnull MetaCharacterMap map)Constructor.- Parameters:
text- the text in which we want to quote metacharactersmap- the MetaCharacterMap
-
-
Method Detail
-
process
public void process() throws java.io.IOExceptionQuote metacharacters in the text.- Throws:
java.io.IOException
-
emitLiteral
public abstract void emitLiteral(java.lang.String s) throws java.io.IOExceptionDowncall method to emit literal text, in which any occurrences of the metacharacters are quoted.- Parameters:
s- the literal text to emit- Throws:
java.io.IOException
-
findNextMeta
private int findNextMeta(java.lang.String s, int start)
-
-