Package org.apache.felix.gogo.runtime
Class Expander
java.lang.Object
org.apache.felix.gogo.runtime.BaseTokenizer
org.apache.felix.gogo.runtime.Expander
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate static final charprivate final Evaluateprivate booleanprivate booleanprivate booleanprivate booleanprivate boolean -
Constructor Summary
ConstructorsConstructorDescriptionExpander(CharSequence text, Evaluate evaluate, boolean inQuote, boolean generateFileNames, boolean semanticJoin, boolean unquote, boolean asPattern) -
Method Summary
Modifier and TypeMethodDescriptionprivate CharSequenceansiEscape(CharSequence arg) private <T> Collection<T>asCollection(Object val) private ObjectdoExpand()private Objectexpand()expand(CharSequence word) expand(CharSequence word, boolean generateFileNames, boolean semanticJoin, boolean unquote) static Objectexpand(CharSequence word, Evaluate eval) expand variables, quotes and escapes in word.private static Objectexpand(CharSequence word, Evaluate eval, boolean inQuote) private static Objectexpand(CharSequence word, Evaluate eval, boolean inQuote, boolean generateFileNames, boolean semanticJoin, boolean unquote, boolean asPattern) protected List<? extends CharSequence>expandBraces(CharSequence arg) private ObjectexpandPattern(CharSequence word) private Objectprivate ObjectexpandVar(boolean rawVariable) private voidprivate CharSequencefindUntil(CharSequence text, int start, String closing) protected List<? extends CharSequence>private Objectprivate ObjectgetName(char closing) private StringgetPattern(String closing) private ObjectgetValue()private Tokengroup()private static booleanisGlobMeta(char ch) private booleanisName(char ch) private static booleanisRegexMeta(char ch) private static charprivate intnumericCompare(String s1, String s2, boolean caseInsensitive) private Stringprivate Stringprivate Stringprivate Collection<Object>toCollection(Object val) private static StringtoRegexPattern(String str, boolean shortest) private CharSequenceunquote(CharSequence arg) private Stringprivate static StringunquoteGlob(String str) Convert a string containing escape sequences and quotes, representing a glob pattern to the corresponding regexp patternprivate String
-
Field Details
-
evaluate
-
inQuote
private boolean inQuote -
generateFileNames
private boolean generateFileNames -
semanticJoin
private boolean semanticJoin -
unquote
private boolean unquote -
asPattern
private boolean asPattern -
rawVariable
private boolean rawVariable -
EOL
private static final char EOL- See Also:
-
-
Constructor Details
-
Expander
public Expander(CharSequence text, Evaluate evaluate, boolean inQuote, boolean generateFileNames, boolean semanticJoin, boolean unquote, boolean asPattern)
-
-
Method Details
-
expand
expand variables, quotes and escapes in word.- Parameters:
word- the wordeval- the eval- Returns:
- Object
- Throws:
Exception- on exception
-
expand
- Throws:
Exception
-
expand
private static Object expand(CharSequence word, Evaluate eval, boolean inQuote, boolean generateFileNames, boolean semanticJoin, boolean unquote, boolean asPattern) throws Exception - Throws:
Exception
-
expand
- Throws:
Exception
-
expand
public Object expand(CharSequence word, boolean generateFileNames, boolean semanticJoin, boolean unquote) throws Exception - Throws:
Exception
-
expandPattern
- Throws:
Exception
-
expand
- Throws:
Exception
-
unquote
-
expandBraces
- Throws:
Exception
-
generateFileNames
- Throws:
IOException
-
doExpand
- Throws:
Exception
-
ansiEscape
-
expandExp
-
group
-
expandVar
- Throws:
Exception
-
expandVar
- Throws:
Exception
-
quote
-
unquote
-
numericCompare
-
toCamelCase
-
sharp
-
visible
-
asCollection
-
toCollection
-
asMap
-
toList
-
getAndEvaluateName
- Throws:
Exception
-
getName
- Throws:
Exception
-
getPattern
- Throws:
Exception
-
findUntil
-
getValue
- Throws:
Exception
-
findClosing
private void findClosing() -
isRegexMeta
private static boolean isRegexMeta(char ch) -
isGlobMeta
private static boolean isGlobMeta(char ch) -
next
-
unquoteGlob
Convert a string containing escape sequences and quotes, representing a glob pattern to the corresponding regexp pattern -
toRegexPattern
-
isName
private boolean isName(char ch)
-