Package com.sun.source.tree

Examples of com.sun.source.tree.MemberSelectTree


    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;
View Full Code Here


    if (select instanceof IdentifierTree) {
      // simple call: method(args)
      return ((IdentifierTree) select).getName().toString();
    }
    // calls with target: target.method(args)
    MemberSelectTree memberSelect = (MemberSelectTree) select;
    return memberSelect.getIdentifier().toString();
  }
View Full Code Here

TOP

Related Classes of com.sun.source.tree.MemberSelectTree

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.