use of org.mvel2.compiler.ExecutableAccessor in project mvel by mikebrock.
the class InlineCollectionsPerformance method testMVELList.
// public static void testMVELList() {
//
// ExecutableAccessor s = (ExecutableAccessor) MVEL.compileExpression("['Foo244':'Bar','Foo244':'Bar','Foo244':'Bar','Foo244':'Bar','Foo244':'Bar']");
// Map list;
// s.getNode().getReducedValueAccelerated(null, null, null);
// for (int i = 0; i < COUNT; i++) {
// list = (Map) s.getNode().getAccessor().getValue(null, null, null);
//
// }
// }
// public static void testMVELList() {
//
// ExecutableAccessor s = (ExecutableAccessor) MVEL.compileExpression("{'Foo244','Bar','Foo244','Bar','Foo244','Bar','Foo244','Bar','Foo244','Bar'}");
// Object[] list;
// s.getNode().getReducedValueAccelerated(null, null, null);
// for (int i = 0; i < COUNT; i++) {
// list = (Object[]) s.getNode().getAccessor().getValue(null, null, null);
//
// // assert "Foo244".equals(list.get(0)) && "Foo244".equals(list.get(2)) && list.size() == 10;
// }
// }
public static void testMVELList() {
ExecutableAccessor s = (ExecutableAccessor) MVEL.compileExpression("['Foo244','Bar','Foo244','Bar','Foo244','Bar','Foo244','Bar','Foo244','Bar']");
List list;
s.getNode().getReducedValueAccelerated(null, null, null);
for (int i = 0; i < COUNT; i++) {
list = (List) s.getNode().getAccessor().getValue(null, null, null);
assert "Foo244".equals(list.get(0)) && "Foo244".equals(list.get(2)) && list.size() == 10;
}
}
Aggregations