langtools/src/share/classes/com/sun/tools/javac/tree/TreeInfo.java
changeset 24903 41e1812d6b4c
parent 24219 e7dc661cafae
child 25289 9573116c764c
--- a/langtools/src/share/classes/com/sun/tools/javac/tree/TreeInfo.java	Tue Jun 10 15:25:01 2014 -0600
+++ b/langtools/src/share/classes/com/sun/tools/javac/tree/TreeInfo.java	Wed Jun 11 12:49:10 2014 -0400
@@ -135,6 +135,14 @@
         }
     }
 
+    public static boolean isReceiverParam(JCTree tree) {
+        if (tree.hasTag(VARDEF)) {
+            return ((JCVariableDecl)tree).nameexpr != null;
+        } else {
+            return false;
+        }
+    }
+
     /** Is there a constructor declaration in the given list of trees?
      */
     public static boolean hasConstructors(List<JCTree> trees) {