Bug 568287 - [16] DOM Support for JLS16 Removing noreference
Change-Id: Ib1bd342f9d93f560ac340c02f7ba03fc2cf85780
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IMethodBinding.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IMethodBinding.java
index d6ed09e..b901335 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IMethodBinding.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IMethodBinding.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2020 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -7,6 +7,9 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
*
* Contributors:
* IBM Corporation - initial API and implementation
@@ -72,7 +75,7 @@
*
* @return <code>true</code> if this is the binding for a compact constructor
* in a source file and and <code>false</code> otherwise
- * @noreference
+ * @since 3.25 BETA_JAVA16
*/
public boolean isCompactConstructor();
@@ -85,7 +88,7 @@
*
* @return <code>true</code> if this is the binding for a canonical constructor
* and <code>false</code> otherwise
- * @noreference
+ * @since 3.25 BETA_JAVA16
*/
public boolean isCanonicalConstructor();
@@ -448,7 +451,7 @@
*
* @return <code>true</code> for compiler generated equals(), hashCode() and toString() or any
* accessor method of a Record, else it returns <code>false</code>.
- * @noreference This method is not intended to be referenced by clients.
+ * @since 3.25 BETA_JAVA16
*/
public boolean isSyntheticRecordMethod();
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ITypeBinding.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ITypeBinding.java
index e7cd8ec..d992b13 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ITypeBinding.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ITypeBinding.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2019 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -7,6 +7,9 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
*
* Contributors:
* IBM Corporation - initial API and implementation
@@ -807,7 +810,7 @@
*
* @return <code>true</code> if this object represents a record type,
* and <code>false</code> otherwise
- * @noreference
+ * @since 3.25 BETA_JAVA16
*/
public boolean isRecord();
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IVariableBinding.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IVariableBinding.java
index 524874c..a2137aa 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IVariableBinding.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IVariableBinding.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2020 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -7,6 +7,9 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
*
* Contributors:
* IBM Corporation - initial API and implementation
@@ -63,8 +66,7 @@
*
* @return <code>true</code> if this is the binding for a record component,
* and <code>false</code> otherwise
- * @since 3.22
- * @noreference This method is not intended to be referenced by clients.
+ * @since 3.25 BETA_JAVA16
*/
public default boolean isRecordComponent() {
return false;
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodDeclaration.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodDeclaration.java
index d9a5e5e..f249e5b 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodDeclaration.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodDeclaration.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2020 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -298,27 +298,11 @@
* @since 3.0
*/
public static List propertyDescriptors(int apiLevel) {
- return propertyDescriptors(apiLevel, false);
- }
-
- /**
- * Returns a list of structural property descriptors for this node type.
- * Clients must not modify the result.
- *
- * @param apiLevel the API level; one of the
- * <code>AST.JLS*</code> constants
- * @param previewEnabled the previewEnabled flag
- * @return a list of property descriptors (element type:
- * {@link StructuralPropertyDescriptor})
- * @noreference This method is not intended to be referenced by clients.
- * @since 3.22
- */
- public static List propertyDescriptors(int apiLevel, boolean previewEnabled) {
if (apiLevel == AST.JLS2_INTERNAL) {
return PROPERTY_DESCRIPTORS_2_0;
} else if (apiLevel < AST.JLS8_INTERNAL) {
return PROPERTY_DESCRIPTORS_3_0;
- } else if (DOMASTUtil.isRecordDeclarationSupported(apiLevel, previewEnabled)) {
+ } else if (DOMASTUtil.isRecordDeclarationSupported(apiLevel)) { // >= JLS 16
return PROPERTY_DESCRIPTORS_9_0;
} else {
return PROPERTY_DESCRIPTORS_8_0;
@@ -468,11 +452,6 @@
}
@Override
- final List internalStructuralPropertiesForType(int apiLevel, boolean previewEnabled) {
- return propertyDescriptors(apiLevel, previewEnabled);
- }
-
- @Override
final int internalGetSetIntProperty(SimplePropertyDescriptor property, boolean get, int value) {
if (property == MODIFIERS_PROPERTY) {
if (get) {
@@ -745,8 +724,7 @@
*
* @param isCompactConstructor <code>true</code> for a constructor declaration,
* and <code>false</code> for a method declaration
- * @since 3.24 BETA_JAVA16
- * @noreference This method is not intended to be referenced by clients.
+ * @since 3.25 BETA_JAVA16
* @exception UnsupportedOperationException if this operation is used below JLS16
*/
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/RecordDeclaration.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/RecordDeclaration.java
index c6c6478..02c75bb 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/RecordDeclaration.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/RecordDeclaration.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2019, 2020 IBM Corporation and others.
+ * Copyright (c) 2019, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -11,6 +11,10 @@
* Community Process (JCP) and is made available for testing and evaluation purposes
* only. The code is not compatible with any specification of the JCP.
*
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -163,8 +167,7 @@
* @return a list of property descriptors (element type:
* {@link StructuralPropertyDescriptor})
- * @noreference This method is not intended to be referenced by clients.
- * @since 3.24 BETA_JAVA16
+ * @since 3.25 BETA_JAVA16
*/
public static List propertyDescriptors(int apiLevel) {
return PROPERTY_DESCRIPTORS;
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SwitchCase.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SwitchCase.java
index 1d2de52..fca60bc 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SwitchCase.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SwitchCase.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2020 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -7,6 +7,9 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
*
* Contributors:
* IBM Corporation - initial API and implementation
@@ -46,7 +49,6 @@
/**
* The "expression" structural property of this node type (child type: {@link Expression}). (added in JEP 325).
- * @noreference This property is not intended to be referenced by clients as it is a part of Java preview feature.
* @since 3.18
*/
public static final ChildListPropertyDescriptor EXPRESSIONS2_PROPERTY =
@@ -54,7 +56,6 @@
/**
* The "switchLabeledRule" structural property of this node type (type: {@link Boolean}).
- * @noreference This property is not intended to be referenced by clients as it is a part of Java preview feature.
* @since 3.18
*/
public static final SimplePropertyDescriptor SWITCH_LABELED_RULE_PROPERTY =
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/util/DOMASTUtil.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/util/DOMASTUtil.java
index d5a9059..ea5c3b2 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/util/DOMASTUtil.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/util/DOMASTUtil.java
@@ -138,8 +138,8 @@
return isNodeTypeSupportedinAST(ast, ASTNode.RECORD_DECLARATION);
}
- public static boolean isRecordDeclarationSupported(int apiLevel, boolean previewEnabled) {
- return isNodeTypeSupportedinAST(apiLevel, previewEnabled, ASTNode.RECORD_DECLARATION);
+ public static boolean isRecordDeclarationSupported(int apiLevel) {
+ return isNodeTypeSupportedinAST(apiLevel, true, ASTNode.RECORD_DECLARATION);
}
public static boolean isPatternInstanceofExpressionSupported(AST ast) {