use of org.elasticsearch.painless.Definition.MethodKey in project elasticsearch by elastic.
the class NodeToStringTests method testPSubShortcut.
public void testPSubShortcut() {
Location l = new Location(getTestName(), 0);
Struct s = Definition.getType(FeatureTest.class.getName()).struct;
Method getter = s.methods.get(new MethodKey("getX", 0));
Method setter = s.methods.get(new MethodKey("setX", 1));
PSubShortcut node = new PSubShortcut(l, "x", FeatureTest.class.getName(), getter, setter);
node.prefix = new EVariable(l, "a");
assertEquals("(PSubShortcut (EVariable a) x)", node.toString());
assertEquals("(PSubNullSafeCallInvoke (PSubShortcut (EVariable a) x))", new PSubNullSafeCallInvoke(l, node).toString());
}
Aggregations