Package org.mvel2.util
Class ProtoParser
- java.lang.Object
-
- org.mvel2.util.ProtoParser
-
public class ProtoParser extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static interface
ProtoParser.DeferredTypeResolve
-
Field Summary
Fields Modifier and Type Field Description private int
cursor
private static java.lang.ThreadLocal<java.util.Queue<ProtoParser.DeferredTypeResolve>>
deferred
private java.lang.String
deferredName
private int
endOffset
private char[]
expr
private boolean
interpreted
private java.lang.String
name
private ParserContext
pCtx
private java.lang.String
protoName
private ExecutionStack
splitAccumulator
(package private) java.lang.String
tk1
(package private) java.lang.String
tk2
private java.lang.Class
type
-
Constructor Summary
Constructors Constructor Description ProtoParser(char[] expr, int offset, int offsetEnd, java.lang.String protoName, ParserContext pCtx, int fields, ExecutionStack splitAccumulator)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
calculateDecl()
static void
checkForPossibleUnresolvedViolations(char[] expr, int cursor, ParserContext pCtx)
This is such a horrible hack, but it's more performant than any other horrible hack I can think of right now.private void
enqueueReceiverForLateResolution(java.lang.String name, Proto.Receiver receiver, java.lang.String initializer)
int
getCursor()
static java.lang.String
getNextUnresolvedWaiting()
static boolean
isUnresolvedWaiting()
static void
notifyForLateResolution(Proto proto)
Proto
parse()
-
-
-
Field Detail
-
expr
private char[] expr
-
pCtx
private ParserContext pCtx
-
endOffset
private int endOffset
-
cursor
private int cursor
-
protoName
private java.lang.String protoName
-
tk1
java.lang.String tk1
-
tk2
java.lang.String tk2
-
type
private java.lang.Class type
-
name
private java.lang.String name
-
deferredName
private java.lang.String deferredName
-
interpreted
private boolean interpreted
-
splitAccumulator
private ExecutionStack splitAccumulator
-
deferred
private static java.lang.ThreadLocal<java.util.Queue<ProtoParser.DeferredTypeResolve>> deferred
-
-
Constructor Detail
-
ProtoParser
public ProtoParser(char[] expr, int offset, int offsetEnd, java.lang.String protoName, ParserContext pCtx, int fields, ExecutionStack splitAccumulator)
-
-
Method Detail
-
parse
public Proto parse()
-
calculateDecl
private void calculateDecl()
-
enqueueReceiverForLateResolution
private void enqueueReceiverForLateResolution(java.lang.String name, Proto.Receiver receiver, java.lang.String initializer)
-
notifyForLateResolution
public static void notifyForLateResolution(Proto proto)
-
getCursor
public int getCursor()
-
checkForPossibleUnresolvedViolations
public static void checkForPossibleUnresolvedViolations(char[] expr, int cursor, ParserContext pCtx)
This is such a horrible hack, but it's more performant than any other horrible hack I can think of right now.- Parameters:
expr
- exprcursor
- cursorpCtx
- pCtx
-
isUnresolvedWaiting
public static boolean isUnresolvedWaiting()
-
getNextUnresolvedWaiting
public static java.lang.String getNextUnresolvedWaiting()
-
-