if (TreeUtils.isSuperCall(tw.getTree())) {
// this is a call of type super.staticMethod(args) -> it should be handled as a simple call to
// staticMethod
return MemberWriters.buildTarget(tw);
}
MemberSelectTree memberSelect = (MemberSelectTree) select;
JS targetJS = visitor.scan(memberSelect.getExpression(), tw.getContext());
if (tw.isStatic() && !ElementUtils.isTypeKind(tw.child(memberSelect).child(memberSelect.getExpression()).getElement())) {
//this is static method called from an instances: e.g. x.staticMethod()
targetJS = tw.getContext().js().property(targetJS, JavascriptKeywords.CONSTRUCTOR);
}
return targetJS;