< prev index next >
src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor6.java
Print this page
*** 138,147 ****
--- 138,148 ----
* @param e {@inheritDoc}
* @param p {@inheritDoc}
* @return the result of the kind-specific visit method
*/
@Override
+ @SuppressWarnings("preview")
public R visitType(TypeElement e, P p) {
ElementKind k = e.getKind();
switch(k) {
case ANNOTATION_TYPE:
return visitTypeAsAnnotationType(e, p);
*** 214,237 ****
public R visitTypeAsInterface(TypeElement e, P p) {
return defaultAction(e, p);
}
/**
* Visits a {@code RECORD} type element.
*
* @implSpec This implementation calls {@code visitUnknown}.
*.
* @param e the element to visit
* @param p a visitor-specified parameter
* @return the result of {@code visitUnknown}
*
* @since 14
- * @deprecated This method is part of a preview feature and may be removed
- * if the preview feature is removed.
*/
! @Deprecated(forRemoval=true, since="14")
! @SuppressWarnings("removal")
public R visitTypeAsRecord(TypeElement e, P p) {
return visitUnknown(e, p);
}
/**
--- 215,245 ----
public R visitTypeAsInterface(TypeElement e, P p) {
return defaultAction(e, p);
}
/**
+ * {@preview Associated with records, a preview feature of the Java language.
+ *
+ * This method is associated with <i>records</i>, a preview
+ * feature of the Java language. Programs can only use this
+ * method when preview features are enabled. Preview features
+ * may be removed in a future release, or upgraded to permanent
+ * features of the Java language.}
+ *
* Visits a {@code RECORD} type element.
*
* @implSpec This implementation calls {@code visitUnknown}.
*.
* @param e the element to visit
* @param p a visitor-specified parameter
* @return the result of {@code visitUnknown}
*
* @since 14
*/
! @jdk.internal.PreviewFeature(feature=jdk.internal.PreviewFeature.Feature.RECORDS,
! essentialAPI=false)
! @SuppressWarnings("preview")
public R visitTypeAsRecord(TypeElement e, P p) {
return visitUnknown(e, p);
}
/**
< prev index next >