|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mvel2.util.ParseTools
public class ParseTools
| Nested Class Summary | |
|---|---|
static class |
ParseTools.WithStatementPair
|
| Field Summary | |
|---|---|
static java.lang.Class[] |
EMPTY_CLS_ARR
|
static java.lang.Object[] |
EMPTY_OBJ_ARR
|
| Constructor Summary | |
|---|---|
ParseTools()
|
|
| Method Summary | |
|---|---|
static int |
__resolveType(java.lang.Class cls)
|
static int |
balancedCapture(char[] chars,
int start,
char type)
This is an important aspect of the core parser tools. |
static int |
balancedCaptureWithLineAccounting(char[] chars,
int start,
char type,
ParserContext pCtx)
|
static java.lang.Class |
boxPrimitive(java.lang.Class cls)
|
static java.lang.String[] |
captureContructorAndResidual(char[] cs)
|
static int |
captureStringLiteral(char type,
char[] expr,
int cursor,
int length)
|
static int |
captureToEOS(char[] expr,
int cursor,
ParserContext pCtx)
|
static int |
captureToNextTokenJunction(char[] expr,
int cursor,
ParserContext pCtx)
|
static void |
checkNameSafety(java.lang.String name)
|
static boolean |
containsCheck(java.lang.Object compareTo,
java.lang.Object compareTest)
|
static java.lang.Class |
createClass(java.lang.String className,
ParserContext pCtx)
|
static int |
createClassSignatureHash(java.lang.Class declaring,
java.lang.Class[] sig)
|
static char[] |
createShortFormOperativeAssignment(java.lang.String name,
char[] statement,
int operation)
|
static java.lang.String |
createStringTrimmed(char[] s)
|
static java.lang.String |
createStringTrimmed(char[] s,
int start,
int length)
|
static java.lang.reflect.Method |
determineActualTargetMethod(java.lang.reflect.Method method)
|
static boolean |
endsWith(char[] c,
char[] test)
|
static int |
find(char[] c,
char find)
|
static int |
findAbsoluteLast(char[] array)
|
static java.lang.Class |
findClass(VariableResolverFactory factory,
java.lang.String name,
ParserContext ctx)
|
static ClassImportResolverFactory |
findClassImportResolverFactory(VariableResolverFactory factory)
|
static int |
findLast(char[] c,
char find)
|
static java.lang.Class |
getBaseComponentType(java.lang.Class cls)
|
static java.lang.reflect.Method |
getBestCandidate(java.lang.Class[] arguments,
java.lang.String method,
java.lang.Class decl,
java.lang.reflect.Method[] methods,
boolean requireExact)
|
static java.lang.reflect.Method |
getBestCandidate(java.lang.Object[] arguments,
java.lang.String method,
java.lang.Class decl,
java.lang.reflect.Method[] methods,
boolean requireExact)
|
static java.lang.reflect.Constructor |
getBestConstructorCanadidate(java.lang.Object[] args,
java.lang.Class cls,
boolean requireExact)
|
static java.lang.reflect.Constructor[] |
getConstructors(java.lang.Class cls)
|
static java.io.FileWriter |
getDebugFileWriter()
|
static java.lang.reflect.Method |
getExactMatch(java.lang.String name,
java.lang.Class[] args,
java.lang.Class returnType,
java.lang.Class cls)
|
static java.lang.Class |
getSubComponentType(java.lang.Class cls)
|
static java.lang.reflect.Method |
getWidenedTarget(java.lang.reflect.Method method)
|
static int |
handleEscapeSequence(char[] escapeStr,
int pos)
Replace escape sequences and return trim required. |
static java.lang.Object |
handleNumericConversion(char[] val)
|
static java.lang.String |
handleStringEscapes(char[] input)
|
static boolean |
isDigit(int c)
|
static boolean |
isIdentifierPart(int c)
|
static boolean |
isJunct(char c)
|
static boolean |
isNotValidNameorLabel(java.lang.String name)
Check if the specfied string represents a valid name of label. |
static boolean |
isNumber(char[] val)
|
static boolean |
isNumber(java.lang.Object val)
|
static boolean |
isNumber(java.lang.String val)
|
static boolean |
isNumeric(java.lang.Object val)
|
static boolean |
isNumericallyCoercible(java.lang.Class target,
java.lang.Class parm)
|
static boolean |
isPrimitiveWrapper(java.lang.Class clazz)
|
static boolean |
isReservedWord(java.lang.String name)
Check if the specified string is a reserved word in the parser. |
static boolean |
isStatementNotManuallyTerminated(char[] expr,
int cursor)
|
static boolean |
isWhitespace(char c)
|
static char[] |
loadFromFile(java.io.File file)
|
static char[] |
loadFromFile(java.io.File file,
java.lang.String encoding)
|
static java.lang.Object |
narrowType(java.math.BigDecimal result,
int returnTarget)
|
static int |
nextNonBlank(char[] expr,
int cursor)
|
static int |
numericTest(char[] val)
|
static int |
opLookup(char c)
|
static java.io.Serializable |
optimizeTree(CompiledExpression compiled)
|
static java.lang.String[] |
parseMethodOrConstructor(char[] parm)
|
static java.lang.String[] |
parseParameterDefList(char[] parm,
int offset,
int length)
|
static java.lang.String[] |
parseParameterList(char[] parm,
int offset,
int length)
|
static void |
parseWithExpressions(java.lang.String nestParm,
char[] block,
int begin,
int ending,
java.lang.Object ctx,
VariableResolverFactory factory)
|
static char[] |
readIn(java.io.InputStream inStream,
java.lang.String encoding)
|
static java.lang.String |
repeatChar(char c,
int times)
|
static int |
resolveType(java.lang.Class cls)
|
static int |
resolveType(java.lang.Object o)
|
static int |
scoreInterface(java.lang.Class parm,
java.lang.Class arg)
|
static float |
similarity(java.lang.String s1,
java.lang.String s2)
|
static int |
skipWhitespace(char[] expr,
int cursor,
ParserContext pCtx)
|
static char[] |
subArray(char[] expr,
int start,
int end)
|
static java.io.Serializable |
subCompileExpression(char[] expression)
|
static java.io.Serializable |
subCompileExpression(char[] expression,
ParserContext ctx)
|
static java.io.Serializable |
subCompileExpression(java.lang.String expression,
ParserContext ctx)
|
static char[] |
subset(char[] array,
int start)
|
static char[] |
subset(char[] array,
int start,
int length)
|
static int |
trimLeft(char[] expr,
int start,
int pos)
From the specified cursor position, trim out any whitespace between the current position and the end of the last non-whitespace character. |
static int |
trimRight(char[] expr,
int start,
int pos)
From the specified cursor position, trim out any whitespace between the current position and beginning of the first non-whitespace character. |
static java.lang.Class |
unboxPrimitive(java.lang.Class cls)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.Object[] EMPTY_OBJ_ARR
public static final java.lang.Class[] EMPTY_CLS_ARR
| Constructor Detail |
|---|
public ParseTools()
| Method Detail |
|---|
public static java.lang.String[] parseMethodOrConstructor(char[] parm)
public static java.lang.String[] parseParameterDefList(char[] parm,
int offset,
int length)
public static java.lang.String[] parseParameterList(char[] parm,
int offset,
int length)
public static java.lang.reflect.Method getBestCandidate(java.lang.Object[] arguments,
java.lang.String method,
java.lang.Class decl,
java.lang.reflect.Method[] methods,
boolean requireExact)
public static java.lang.reflect.Method getBestCandidate(java.lang.Class[] arguments,
java.lang.String method,
java.lang.Class decl,
java.lang.reflect.Method[] methods,
boolean requireExact)
public static int scoreInterface(java.lang.Class parm,
java.lang.Class arg)
public static java.lang.reflect.Method getExactMatch(java.lang.String name,
java.lang.Class[] args,
java.lang.Class returnType,
java.lang.Class cls)
public static java.lang.reflect.Method getWidenedTarget(java.lang.reflect.Method method)
public static java.lang.reflect.Constructor getBestConstructorCanadidate(java.lang.Object[] args,
java.lang.Class cls,
boolean requireExact)
public static java.lang.Class createClass(java.lang.String className,
ParserContext pCtx)
throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundExceptionpublic static java.lang.reflect.Constructor[] getConstructors(java.lang.Class cls)
public static java.lang.String[] captureContructorAndResidual(char[] cs)
public static java.lang.Class boxPrimitive(java.lang.Class cls)
public static java.lang.Class unboxPrimitive(java.lang.Class cls)
public static boolean containsCheck(java.lang.Object compareTo,
java.lang.Object compareTest)
public static int createClassSignatureHash(java.lang.Class declaring,
java.lang.Class[] sig)
public static int handleEscapeSequence(char[] escapeStr,
int pos)
escapeStr - -pos - -
public static char[] createShortFormOperativeAssignment(java.lang.String name,
char[] statement,
int operation)
public static ClassImportResolverFactory findClassImportResolverFactory(VariableResolverFactory factory)
public static java.lang.Class findClass(VariableResolverFactory factory,
java.lang.String name,
ParserContext ctx)
throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
public static char[] subset(char[] array,
int start,
int length)
public static char[] subset(char[] array,
int start)
public static int resolveType(java.lang.Object o)
public static int resolveType(java.lang.Class cls)
public static int __resolveType(java.lang.Class cls)
public static boolean isNumericallyCoercible(java.lang.Class target,
java.lang.Class parm)
public static java.lang.Object narrowType(java.math.BigDecimal result,
int returnTarget)
public static java.lang.reflect.Method determineActualTargetMethod(java.lang.reflect.Method method)
public static int captureToNextTokenJunction(char[] expr,
int cursor,
ParserContext pCtx)
public static int nextNonBlank(char[] expr,
int cursor)
public static int skipWhitespace(char[] expr,
int cursor,
ParserContext pCtx)
public static boolean isStatementNotManuallyTerminated(char[] expr,
int cursor)
public static int captureToEOS(char[] expr,
int cursor,
ParserContext pCtx)
public static int trimLeft(char[] expr,
int start,
int pos)
pos - - current position
public static int trimRight(char[] expr,
int start,
int pos)
pos - -
public static char[] subArray(char[] expr,
int start,
int end)
public static int balancedCapture(char[] chars,
int start,
char type)
chars - -start - -type - -
public static int balancedCaptureWithLineAccounting(char[] chars,
int start,
char type,
ParserContext pCtx)
public static java.lang.String handleStringEscapes(char[] input)
public static int captureStringLiteral(char type,
char[] expr,
int cursor,
int length)
public static void parseWithExpressions(java.lang.String nestParm,
char[] block,
int begin,
int ending,
java.lang.Object ctx,
VariableResolverFactory factory)
public static java.lang.Object handleNumericConversion(char[] val)
public static boolean isNumeric(java.lang.Object val)
public static int numericTest(char[] val)
public static boolean isNumber(java.lang.Object val)
public static boolean isNumber(java.lang.String val)
public static boolean isNumber(char[] val)
public static int find(char[] c,
char find)
public static int findLast(char[] c,
char find)
public static java.lang.String createStringTrimmed(char[] s)
public static java.lang.String createStringTrimmed(char[] s,
int start,
int length)
public static boolean endsWith(char[] c,
char[] test)
public static boolean isIdentifierPart(int c)
public static boolean isDigit(int c)
public static float similarity(java.lang.String s1,
java.lang.String s2)
public static int findAbsoluteLast(char[] array)
public static java.lang.Class getBaseComponentType(java.lang.Class cls)
public static java.lang.Class getSubComponentType(java.lang.Class cls)
public static boolean isJunct(char c)
public static int opLookup(char c)
public static boolean isReservedWord(java.lang.String name)
name - -
public static boolean isNotValidNameorLabel(java.lang.String name)
name - -
public static void checkNameSafety(java.lang.String name)
public static java.io.FileWriter getDebugFileWriter()
throws java.io.IOException
java.io.IOExceptionpublic static boolean isPrimitiveWrapper(java.lang.Class clazz)
public static java.io.Serializable subCompileExpression(char[] expression)
public static java.io.Serializable subCompileExpression(char[] expression,
ParserContext ctx)
public static java.io.Serializable subCompileExpression(java.lang.String expression,
ParserContext ctx)
public static java.io.Serializable optimizeTree(CompiledExpression compiled)
public static boolean isWhitespace(char c)
public static java.lang.String repeatChar(char c,
int times)
public static char[] loadFromFile(java.io.File file)
throws java.io.IOException
java.io.IOException
public static char[] loadFromFile(java.io.File file,
java.lang.String encoding)
throws java.io.IOException
java.io.IOException
public static char[] readIn(java.io.InputStream inStream,
java.lang.String encoding)
throws java.io.IOException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||