org.mvel2.optimizers.dynamic
Class DynamicOptimizer

java.lang.Object
  extended by org.mvel2.compiler.AbstractParser
      extended by org.mvel2.optimizers.AbstractOptimizer
          extended by org.mvel2.optimizers.dynamic.DynamicOptimizer
All Implemented Interfaces:
java.io.Serializable, AccessorOptimizer

public class DynamicOptimizer
extends AbstractOptimizer
implements AccessorOptimizer

See Also:
Serialized Form

Field Summary
static DynamicClassLoader classLoader
           
static int COLLECTION
           
static int maximumTenure
           
static int OBJ_CREATION
           
static int REGULAR_ACCESSOR
           
static int SET_ACCESSOR
           
static int tenuringThreshold
           
static long timeSpan
           
static int totalRecycled
           
 
Fields inherited from class org.mvel2.optimizers.AbstractOptimizer
BEAN, COL, collection, currType, METH, nullSafe, start, WITH
 
Fields inherited from class org.mvel2.compiler.AbstractParser
compileMode, ctx, cursor, debugSymbols, dStack, expr, fields, GET, GET_OR_CREATE, greedy, lastLineStart, lastNode, lastWasComment, lastWasIdentifier, lastWasLineLabel, length, LEVEL_0_PROPERTY_ONLY, LEVEL_1_BASIC_LANG, LEVEL_2_MULTI_STATEMENT, LEVEL_3_ITERATION, LEVEL_4_ASSIGNMENT, LEVEL_5_CONTROL_FLOW, line, literalOnly, LITERALS, OP_CONTINUE, OP_OVERFLOW, OP_RESET_FRAME, OP_TERMINATE, OPERATORS, parserContext, pCtx, REMOVE, SET, splitAccumulator, stk, variableFactory
 
Constructor Summary
DynamicOptimizer()
           
 
Method Summary
static void enforceTenureLimit()
           
 java.lang.Class getEgressType()
           
 java.lang.Object getResultOptPass()
           
 void init()
           
 boolean isLiteralOnly()
           
 Accessor optimizeAccessor(ParserContext pCtx, char[] property, java.lang.Object ctx, java.lang.Object thisRef, VariableResolverFactory factory, boolean rootThisRef, java.lang.Class ingressType)
           
 Accessor optimizeCollection(ParserContext pCtx, java.lang.Object rootObject, java.lang.Class type, char[] property, java.lang.Object ctx, java.lang.Object thisRef, VariableResolverFactory factory)
           
 Accessor optimizeObjectCreation(ParserContext pCtx, char[] property, java.lang.Object ctx, java.lang.Object thisRef, VariableResolverFactory factory)
           
 Accessor optimizeSetAccessor(ParserContext pCtx, char[] property, java.lang.Object ctx, java.lang.Object thisRef, VariableResolverFactory factory, boolean rootThisRef, java.lang.Object value, java.lang.Class valueType)
           
 
Methods inherited from class org.mvel2.optimizers.AbstractOptimizer
capture, findLastUnion, nextSubToken, scanTo, tryStaticAccess, whiteSpaceSkip
 
Methods inherited from class org.mvel2.compiler.AbstractParser
addFatalError, addFatalError, addWarning, arithmeticFunctionReduction, captureIdentifier, captureToEOL, captureToEOS, captureToEOSorEOL, captureToEOT, captureToNextTokenJunction, contextControl, expectEOS, expectNextChar_IW, getCurrentSourceFileName, getCurrentThreadParserContext, getParserContext, getPCtx, handleSubstatement, handleUnion, ifThenElseBlockContinues, incNextNonBlank, isArithmeticOperator, isNextIdentifier, isNextIdentifierOrLiteral, isStatementNotManuallyTerminated, lastNonWhite, loadLanguageFeaturesByLevel, lookAhead, lookAhead, lookBehind, lookToLast, newContext, newContext, nextNonBlank, nextToken, nextTokenSkipSymbols, reduce, removeContext, resetParserContext, setCurrentThreadParserContext, setExpression, setExpression, setLanguageLevel, setPCtx, setupParser, skipWhitespace, tokenContinues, trimLeft, trimRight, trimWhitespace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

classLoader

public static DynamicClassLoader classLoader

tenuringThreshold

public static int tenuringThreshold

timeSpan

public static long timeSpan

maximumTenure

public static int maximumTenure

totalRecycled

public static int totalRecycled

REGULAR_ACCESSOR

public static final int REGULAR_ACCESSOR
See Also:
Constant Field Values

SET_ACCESSOR

public static final int SET_ACCESSOR
See Also:
Constant Field Values

COLLECTION

public static final int COLLECTION
See Also:
Constant Field Values

OBJ_CREATION

public static final int OBJ_CREATION
See Also:
Constant Field Values
Constructor Detail

DynamicOptimizer

public DynamicOptimizer()
Method Detail

init

public void init()
Specified by:
init in interface AccessorOptimizer

enforceTenureLimit

public static void enforceTenureLimit()

optimizeAccessor

public Accessor optimizeAccessor(ParserContext pCtx,
                                 char[] property,
                                 java.lang.Object ctx,
                                 java.lang.Object thisRef,
                                 VariableResolverFactory factory,
                                 boolean rootThisRef,
                                 java.lang.Class ingressType)
Specified by:
optimizeAccessor in interface AccessorOptimizer

optimizeSetAccessor

public Accessor optimizeSetAccessor(ParserContext pCtx,
                                    char[] property,
                                    java.lang.Object ctx,
                                    java.lang.Object thisRef,
                                    VariableResolverFactory factory,
                                    boolean rootThisRef,
                                    java.lang.Object value,
                                    java.lang.Class valueType)
Specified by:
optimizeSetAccessor in interface AccessorOptimizer

optimizeCollection

public Accessor optimizeCollection(ParserContext pCtx,
                                   java.lang.Object rootObject,
                                   java.lang.Class type,
                                   char[] property,
                                   java.lang.Object ctx,
                                   java.lang.Object thisRef,
                                   VariableResolverFactory factory)
Specified by:
optimizeCollection in interface AccessorOptimizer

optimizeObjectCreation

public Accessor optimizeObjectCreation(ParserContext pCtx,
                                       char[] property,
                                       java.lang.Object ctx,
                                       java.lang.Object thisRef,
                                       VariableResolverFactory factory)
Specified by:
optimizeObjectCreation in interface AccessorOptimizer

getResultOptPass

public java.lang.Object getResultOptPass()
Specified by:
getResultOptPass in interface AccessorOptimizer

getEgressType

public java.lang.Class getEgressType()
Specified by:
getEgressType in interface AccessorOptimizer

isLiteralOnly

public boolean isLiteralOnly()
Specified by:
isLiteralOnly in interface AccessorOptimizer


Copyright © 2010. All Rights Reserved.