@Test public void testPerformance() { Person person = new Person(1L, "Homer"); Expression exp = createExpression("name"); final int COUNT = 1000000; for (int i = 0; i < 1000; i++) { exp.evaluate(person); } long start = System.nanoTime(); for (int i = 0; i < COUNT; i++) { exp.evaluate(person); } long duration = System.nanoTime() - start; System.out.println(getLanguage() + ": " + duration / 1000000 + " ms"); }
public T evaluate(Object target) { return evaluate(target, null); }
AbstractExpression implements Expression<T>, Serializable, PortableObject { public T evaluate(Object target) { return evaluate(target, null); } }
AbstractExpression implements Expression<T>, Serializable, PortableObject { public T evaluate(Object target) { return evaluate(target, null); } protected  AbstractExpression(); protected  AbstractExpression(String expression); protected  AbstractExpression(InputStream expression); }
AbstractExpression implements Expression<T>, Serializable, PortableObject { public T evaluate(Object target) { return evaluate(target, null); } protected  AbstractExpression(); protected  AbstractExpression(String expression); protected  AbstractExpression(InputStream expression); T evaluate(Object target); void readExternal(PofReader reader); void writeExternal(PofWriter writer); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
AbstractExpression implements Expression<T>, Serializable, PortableObject { public T evaluate(Object target) { return evaluate(target, null); } protected  AbstractExpression(); protected  AbstractExpression(String expression); protected  AbstractExpression(InputStream expression); T evaluate(Object target); void readExternal(PofReader reader); void writeExternal(PofWriter writer); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }