< prev index next >

src/java.compiler/share/classes/javax/lang/model/element/ElementVisitor.java

Print this page

        

*** 30,40 **** /** * A visitor of program elements, in the style of the visitor design * pattern. Classes implementing this interface are used to operate * on an element when the kind of element is unknown at compile time. * When a visitor is passed to an element's {@link Element#accept ! * accept} method, the <code>visit<i>XYZ</i></code> method most applicable * to that element is invoked. * * <p> Classes implementing this interface may or may not throw a * {@code NullPointerException} if the additional parameter {@code p} * is {@code null}; see documentation of the implementing class for --- 30,40 ---- /** * A visitor of program elements, in the style of the visitor design * pattern. Classes implementing this interface are used to operate * on an element when the kind of element is unknown at compile time. * When a visitor is passed to an element's {@link Element#accept ! * accept} method, the <code>visit<i>Xyz</i></code> method most applicable * to that element is invoked. * * <p> Classes implementing this interface may or may not throw a * {@code NullPointerException} if the additional parameter {@code p} * is {@code null}; see documentation of the implementing class for
*** 54,66 **** * * <p>Note that methods to accommodate new language constructs could * be added in a source <em>compatible</em> way if they were added as * <em>default methods</em>. However, default methods are only * available on Java SE 8 and higher releases and the {@code ! * javax.lang.model.*} packages bundled in Java SE 8 are required to * also be runnable on Java SE 7. Therefore, default methods ! * <em>cannot</em> be used when extending {@code javax.lang.model.*} * to cover Java SE 8 language features. However, default methods may * be used in subsequent revisions of the {@code javax.lang.model.*} * packages that are only required to run on Java SE 8 and higher * platform versions. * --- 54,66 ---- * * <p>Note that methods to accommodate new language constructs could * be added in a source <em>compatible</em> way if they were added as * <em>default methods</em>. However, default methods are only * available on Java SE 8 and higher releases and the {@code ! * javax.lang.model.*} packages bundled in Java SE 8 were required to * also be runnable on Java SE 7. Therefore, default methods ! * were <em>not</em> used when extending {@code javax.lang.model.*} * to cover Java SE 8 language features. However, default methods may * be used in subsequent revisions of the {@code javax.lang.model.*} * packages that are only required to run on Java SE 8 and higher * platform versions. *
< prev index next >