}
@Override
public JS visit(WriterVisitor<JS> visitor, MemberReferenceTree tree, GenerationContext<JS> context) {
ExecutableElement methodElement = (ExecutableElement) context.getTrees().getElement(context.getCurrentPath());
Element qualifierElement = context.getTrees().getElement(new TreePath(context.getCurrentPath(), tree.getQualifierExpression()));
// System.out.println(tree + ":left:" + tree.getQualifierExpression().getClass() + ", kind:" +
// qualifierElemenet.getKind());
if (tree.getMode() == ReferenceMode.INVOKE) {
if (qualifierElement.getKind() == ElementKind.CLASS) {
if (JavaNodes.isStatic(methodElement)) {
return generateStaticRef(tree, context, methodElement);
}
return generateInstanceRef(tree, context, methodElement);
}