Package edu.umd.cs.findbugs.xml
Class QuoteMetaCharacters
- java.lang.Object
-
- edu.umd.cs.findbugs.xml.QuoteMetaCharacters
-
public abstract class QuoteMetaCharacters extends java.lang.Object
Quote metacharacters in a String.- See Also:
MetaCharacterMap
-
-
Field Summary
Fields Modifier and Type Field Description private MetaCharacterMap
map
private java.lang.String
text
-
Constructor Summary
Constructors Modifier Constructor Description protected
QuoteMetaCharacters(java.lang.String text, MetaCharacterMap map)
Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
emitLiteral(java.lang.String s)
Downcall method to emit literal text, in which any occurrences of the metacharacters are quoted.private int
findNextMeta(java.lang.String s, int start)
void
process()
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.IOException
Quote metacharacters in the text.- Throws:
java.io.IOException
-
emitLiteral
public abstract void emitLiteral(java.lang.String s) throws java.io.IOException
Downcall 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)
-
-