langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java
equal
deleted
inserted
replaced
1665 |
1665 |
1666 /** |
1666 /** |
1667 * This class is used to store important information regarding translation of |
1667 * This class is used to store important information regarding translation of |
1668 * lambda expression/method references (see subclasses). |
1668 * lambda expression/method references (see subclasses). |
1669 */ |
1669 */ |
1670 private abstract class TranslationContext<T extends JCFunctionalExpression> { |
1670 abstract class TranslationContext<T extends JCFunctionalExpression> { |
1671 |
1671 |
1672 /** the underlying (untranslated) tree */ |
1672 /** the underlying (untranslated) tree */ |
1673 final T tree; |
1673 final T tree; |
1674 |
1674 |
1675 /** points to the adjusted enclosing scope in which this lambda/mref expression occurs */ |
1675 /** points to the adjusted enclosing scope in which this lambda/mref expression occurs */ |
1744 * This class retains all the useful information about a lambda expression; |
1744 * This class retains all the useful information about a lambda expression; |
1745 * the contents of this class are filled by the LambdaAnalyzer visitor, |
1745 * the contents of this class are filled by the LambdaAnalyzer visitor, |
1746 * and the used by the main translation routines in order to adjust references |
1746 * and the used by the main translation routines in order to adjust references |
1747 * to captured locals/members, etc. |
1747 * to captured locals/members, etc. |
1748 */ |
1748 */ |
1749 private class LambdaTranslationContext extends TranslationContext<JCLambda> { |
1749 class LambdaTranslationContext extends TranslationContext<JCLambda> { |
1750 |
1750 |
1751 /** variable in the enclosing context to which this lambda is assigned */ |
1751 /** variable in the enclosing context to which this lambda is assigned */ |
1752 final Symbol self; |
1752 final Symbol self; |
1753 |
1753 |
1754 /** variable in the enclosing context to which this lambda is assigned */ |
1754 /** variable in the enclosing context to which this lambda is assigned */ |
2038 * This class retains all the useful information about a method reference; |
2038 * This class retains all the useful information about a method reference; |
2039 * the contents of this class are filled by the LambdaAnalyzer visitor, |
2039 * the contents of this class are filled by the LambdaAnalyzer visitor, |
2040 * and the used by the main translation routines in order to adjust method |
2040 * and the used by the main translation routines in order to adjust method |
2041 * references (i.e. in case a bridge is needed) |
2041 * references (i.e. in case a bridge is needed) |
2042 */ |
2042 */ |
2043 private final class ReferenceTranslationContext extends TranslationContext<JCMemberReference> { |
2043 final class ReferenceTranslationContext extends TranslationContext<JCMemberReference> { |
2044 |
2044 |
2045 final boolean isSuper; |
2045 final boolean isSuper; |
2046 final Symbol sigPolySym; |
2046 final Symbol sigPolySym; |
2047 |
2047 |
2048 ReferenceTranslationContext(JCMemberReference tree) { |
2048 ReferenceTranslationContext(JCMemberReference tree) { |