本文整理汇总了Java中org.mvel2.optimizers.OptimizerFactory.clearThreadAccessorOptimizer方法的典型用法代码示例。如果您正苦于以下问题:Java OptimizerFactory.clearThreadAccessorOptimizer方法的具体用法?Java OptimizerFactory.clearThreadAccessorOptimizer怎么用?Java OptimizerFactory.clearThreadAccessorOptimizer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.mvel2.optimizers.OptimizerFactory
的用法示例。
在下文中一共展示了OptimizerFactory.clearThreadAccessorOptimizer方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: InlineCollectionNode
import org.mvel2.optimizers.OptimizerFactory; //导入方法依赖的package包/类
public InlineCollectionNode(char[] expr, int start, int end, int fields, Class type, ParserContext pctx) {
super(expr, start, end, fields | INLINE_COLLECTION, pctx);
this.egressType = type;
if ((fields & COMPILE_IMMEDIATE) != 0) {
try {
parseGraph(true, type, pctx);
AccessorOptimizer ao = OptimizerFactory.getThreadAccessorOptimizer();
accessor = ao.optimizeCollection(pctx, collectionGraph, egressType, expr, this.trailingStart, trailingOffset, null, null, null);
egressType = ao.getEgressType();
}
finally {
OptimizerFactory.clearThreadAccessorOptimizer();
}
}
}
示例2: getReducedValueAccelerated
import org.mvel2.optimizers.OptimizerFactory; //导入方法依赖的package包/类
public Object getReducedValueAccelerated(Object ctx, Object thisValue, VariableResolverFactory factory) {
if (accessor != null) {
return accessor.getValue(ctx, thisValue, factory);
}
else {
try {
AccessorOptimizer ao = OptimizerFactory.getThreadAccessorOptimizer();
if (collectionGraph == null) parseGraph(true, null, null);
accessor = ao.optimizeCollection(AbstractParser.getCurrentThreadParserContext(), collectionGraph,
egressType, expr, trailingStart, trailingOffset, ctx, thisValue, factory);
egressType = ao.getEgressType();
return accessor.getValue(ctx, thisValue, factory);
}
finally {
OptimizerFactory.clearThreadAccessorOptimizer();
}
}
}
示例3: getReducedValueAccelerated
import org.mvel2.optimizers.OptimizerFactory; //导入方法依赖的package包/类
public Object getReducedValueAccelerated(Object ctx, Object thisValue, VariableResolverFactory factory) {
if (accessor != null) {
return accessor.getValue(literal, thisValue, factory);
}
else {
try {
AccessorOptimizer aO = getThreadAccessorOptimizer();
accessor = aO.optimizeAccessor(getCurrentThreadParserContext(), expr, start, offset,
literal, thisValue, factory, false, null);
return aO.getResultOptPass();
}
finally {
OptimizerFactory.clearThreadAccessorOptimizer();
}
}
}
示例4: getReducedValueAccelerated
import org.mvel2.optimizers.OptimizerFactory; //导入方法依赖的package包/类
public Object getReducedValueAccelerated(Object ctx, Object thisValue, VariableResolverFactory factory) {
if (accessor != null) {
return accessor.getValue(main.getReducedValueAccelerated(ctx, thisValue, factory), thisValue, factory);
}
else {
try {
AccessorOptimizer o = OptimizerFactory.getThreadAccessorOptimizer();
accessor = o.optimizeAccessor(getCurrentThreadParserContext(), expr, start, offset,
main.getReducedValueAccelerated(ctx, thisValue, factory), thisValue, factory, false, main.getEgressType());
return o.getResultOptPass();
}
finally {
OptimizerFactory.clearThreadAccessorOptimizer();
}
}
}
示例5: getValue
import org.mvel2.optimizers.OptimizerFactory; //导入方法依赖的package包/类
public Object getValue(Object ctx, Object elCtx, VariableResolverFactory variableFactory) {
if (!optimized) {
setupOptimizers();
try {
return getValue(ctx, variableFactory);
}
finally {
OptimizerFactory.clearThreadAccessorOptimizer();
}
}
return getValue(ctx, variableFactory);
}
示例6: getValue
import org.mvel2.optimizers.OptimizerFactory; //导入方法依赖的package包/类
public Object getValue(Object staticContext, VariableResolverFactory factory) {
if (accessor == null) {
try {
accessor = getThreadAccessorOptimizer()
.optimizeAccessor(context, expression, 0, expression.length, staticContext, staticContext, factory, false, ingressType);
return getValue(staticContext, factory);
}
finally {
OptimizerFactory.clearThreadAccessorOptimizer();
}
}
return accessor.getValue(staticContext, staticContext, factory);
}