Bug 568287 - [16] DOM Support for JLS16
Change-Id: I3d733b58503d334950a3c8d9f283b643ab06ad8b
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/InstanceofExpression.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/InstanceofExpression.java
index 7981b75..80fe15d 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/InstanceofExpression.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/InstanceofExpression.java
@@ -69,7 +69,7 @@
* {@link StructuralPropertyDescriptor}),
* or null if uninitialized.
*/
- private static final List PROPERTY_DESCRIPTORS_14;
+ private static final List PROPERTY_DESCRIPTORS_16;
static {
List properyList = new ArrayList(3);
@@ -82,7 +82,7 @@
addProperty(LEFT_OPERAND_PROPERTY, properyList);
addProperty(RIGHT_OPERAND_PROPERTY, properyList);
addProperty(PATTERN_VARIABLE_PROPERTY, properyList);
- PROPERTY_DESCRIPTORS_14 = reapPropertyList(properyList);
+ PROPERTY_DESCRIPTORS_16 = reapPropertyList(properyList);
}
/**
@@ -97,27 +97,12 @@
* @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 (DOMASTUtil.isInstanceofExpressionPatternSupported(apiLevel, previewEnabled)) {
- return PROPERTY_DESCRIPTORS_14;
+ if (DOMASTUtil.isInstanceofExpressionPatternSupported(apiLevel, true)) {
+ return PROPERTY_DESCRIPTORS_16;
}
return PROPERTY_DESCRIPTORS;
}
+
/**
* The left operand; lazily initialized; defaults to an unspecified,
* but legal, simple name.
@@ -152,11 +137,6 @@
}
@Override
- final List internalStructuralPropertiesForType(int apiLevel, boolean previewEnabled) {
- return propertyDescriptors(apiLevel, previewEnabled);
- }
-
- @Override
final ASTNode internalGetSetChildProperty(ChildPropertyDescriptor property, boolean get, ASTNode child) {
if (property == LEFT_OPERAND_PROPERTY) {
if (get) {