< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/javac/tree/JCTree.java

Print this page
*** 798,21 ***
      }
  
      /**
       * Common supertype for all functional expression trees (lambda and method references)
       */
!     public abstract static class JCFunctionalExpression extends JCPolyExpression {
  
          public JCFunctionalExpression() {
              //a functional expression is always a 'true' poly
              polyKind = PolyKind.POLY;
          }
  
          /** list of target types inferred for this functional expression. */
          public Type target;
          /** The owner of this functional expression. */
          public Symbol owner;
  
          public Type getDescriptorType(Types types) {
              return target != null ? types.findDescriptorType(target) : types.createErrorType(null);
          }
      }
--- 798,24 ---
      }
  
      /**
       * Common supertype for all functional expression trees (lambda and method references)
       */
!     public abstract static sealed class JCFunctionalExpression extends JCPolyExpression
+                                                                permits JCLambda, JCMemberReference {
  
          public JCFunctionalExpression() {
              //a functional expression is always a 'true' poly
              polyKind = PolyKind.POLY;
          }
  
          /** list of target types inferred for this functional expression. */
          public Type target;
          /** The owner of this functional expression. */
          public Symbol owner;
+         /** code reflection specific metadata. */
+         public MethodSymbol codeModel;
  
          public Type getDescriptorType(Types types) {
              return target != null ? types.findDescriptorType(target) : types.createErrorType(null);
          }
      }

*** 2012,11 ***
      }
  
      /**
       * A lambda expression.
       */
!     public static class JCLambda extends JCFunctionalExpression implements LambdaExpressionTree {
  
          public enum ParameterKind {
              IMPLICIT,
              EXPLICIT
          }
--- 2015,11 ---
      }
  
      /**
       * A lambda expression.
       */
!     public static final class JCLambda extends JCFunctionalExpression implements LambdaExpressionTree {
  
          public enum ParameterKind {
              IMPLICIT,
              EXPLICIT
          }

*** 2601,11 ***
      }
  
      /**
       * Selects a member expression.
       */
!     public static class JCMemberReference extends JCFunctionalExpression implements MemberReferenceTree {
  
          public ReferenceMode mode;
          public ReferenceKind kind;
          public Name name;
          public JCExpression expr;
--- 2604,11 ---
      }
  
      /**
       * Selects a member expression.
       */
!     public static non-sealed class JCMemberReference extends JCFunctionalExpression implements MemberReferenceTree {
  
          public ReferenceMode mode;
          public ReferenceKind kind;
          public Name name;
          public JCExpression expr;
< prev index next >