java.lang.Object | |
↳ | com.pnfsoftware.jeb.util.format.TokenExtractor |
A customizable string token extractor. Standard delimiters are provided: see DF_xxx
objects.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
interface | TokenExtractor.IDelimiterFinder | Definition of a delimiter. |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
public static final TokenExtractor.IDelimiterFinder | DF_Assignment | Delimiter= '=' character. | |||||||||
public static final TokenExtractor.IDelimiterFinder | DF_CommonFullSymbolChars | Delimiter= any character that is generally not legal in a symbol name, in particular:
|
|||||||||
public static final TokenExtractor.IDelimiterFinder | DF_CommonSymbolChars | Delimiter= any character that is generally not legal in a symbol name, in particular:
|
|||||||||
public static final TokenExtractor.IDelimiterFinder | DF_NonAlphaNum | Delimiter= any character that is neither a letter for a digit | |||||||||
public static final TokenExtractor.IDelimiterFinder | DF_WhiteSpace | Delimiter= whitespace character |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
TokenExtractor(TokenExtractor.IDelimiterFinder delimiterFinder)
Create a token extractor.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String |
extract(String s, int o)
Extract the token spanning over the provided offset of the input string.
| ||||||||||
int[] |
extractCoordinates(String s, int o)
Extract the token spanning over the provided offset of the input string.
| ||||||||||
static List<TokenExtractor> |
getGenericTokenList()
Retrieve the generic list of Token Extractor, based on DF_*
TokenExtractor.IDelimiterFinder . |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
boolean | match(String s, int index) |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Delimiter= '=' character. In particular on decompilation comment with pattern when x=myvalue
Delimiter= any character that is generally not legal in a symbol name, in particular:
Delimiter= any character that is generally not legal in a symbol name, in particular:
Delimiter= any character that is neither a letter for a digit
Create a token extractor.
delimiterFinder | a delimiter finder; client code may either create their own or use one
of the standard finders, see DF_*
|
---|
Extract the token spanning over the provided offset of the input string.
s | input string |
---|---|
o | start offset |
Extract the token spanning over the provided offset of the input string.
s | input string |
---|---|
o | start offset |
Retrieve the generic list of Token Extractor, based on DF_* TokenExtractor.IDelimiterFinder
. List is
sorted from least to most restrictive.