Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Des Rivieres2004-11-08 18:49:21 +0000
committerJim Des Rivieres2004-11-08 18:49:21 +0000
commit2a41725ca5a58d03d478b150bfd5c62054f2b020 (patch)
treea86e542cc13299230b65d87e6cf5412110667dc1 /org.eclipse.jdt.core/dom/org/eclipse/jdt/core
parent753a6a1eefe385cd875ac1931b6199ee406e2292 (diff)
downloadeclipse.jdt.core-2a41725ca5a58d03d478b150bfd5c62054f2b020.tar.gz
eclipse.jdt.core-2a41725ca5a58d03d478b150bfd5c62054f2b020.tar.xz
eclipse.jdt.core-2a41725ca5a58d03d478b150bfd5c62054f2b020.zip
Add methods to expose reified inheritable properties on abstract node classes (bug 77359)
Diffstat (limited to 'org.eclipse.jdt.core/dom/org/eclipse/jdt/core')
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AbstractTypeDeclaration.java22
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Annotation.java11
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BodyDeclaration.java27
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SingleVariableDeclaration.java24
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclaration.java60
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclarationFragment.java24
6 files changed, 166 insertions, 2 deletions
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AbstractTypeDeclaration.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AbstractTypeDeclaration.java
index 5bdb513265..e3ff73effe 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AbstractTypeDeclaration.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AbstractTypeDeclaration.java
@@ -49,6 +49,17 @@ public abstract class AbstractTypeDeclaration extends BodyDeclaration {
abstract ChildListPropertyDescriptor internalBodyDeclarationsProperty();
/**
+ * Returns structural property descriptor for the "bodyDeclarations" property
+ * of this node.
+ *
+ * @return the property descriptor
+ * @since 3.1
+ */
+ public final ChildListPropertyDescriptor getBodyDeclarationsProperty() {
+ return internalBodyDeclarationsProperty();
+ }
+
+ /**
* Returns structural property descriptor for the "name" property
* of this node.
*
@@ -57,6 +68,17 @@ public abstract class AbstractTypeDeclaration extends BodyDeclaration {
abstract ChildPropertyDescriptor internalNameProperty();
/**
+ * Returns structural property descriptor for the "name" property
+ * of this node.
+ *
+ * @return the property descriptor
+ * @si
+ */
+ public final ChildPropertyDescriptor getNameProperty() {
+ return internalNameProperty();
+ }
+
+ /**
* Creates and returns a structural property descriptor for the
* "bodyDeclaration" property declared on the given concrete node type.
*
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Annotation.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Annotation.java
index 631d01e607..35e9577dbe 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Annotation.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Annotation.java
@@ -39,6 +39,17 @@ public abstract class Annotation extends Expression implements IExtendedModifier
abstract ChildPropertyDescriptor internalTypeNameProperty();
/**
+ * Returns structural property descriptor for the "typeName" property
+ * of this node.
+ *
+ * @return the property descriptor
+ * @since 3.1
+ */
+ public final ChildPropertyDescriptor getTypeNameProperty() {
+ return internalTypeNameProperty();
+ }
+
+ /**
* Creates and returns a structural property descriptor for the
* "typeName" property declared on the given concrete node type.
*
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BodyDeclaration.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BodyDeclaration.java
index 8b4d8d6459..28b614bc32 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BodyDeclaration.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BodyDeclaration.java
@@ -80,7 +80,7 @@ public abstract class BodyDeclaration extends ASTNode {
/**
* Returns structural property descriptor for the "modifiers" property
- * of this node.
+ * of this node as used in JLS2.
*
* @return the property descriptor
*/
@@ -88,13 +88,25 @@ public abstract class BodyDeclaration extends ASTNode {
/**
* Returns structural property descriptor for the "modifiers" property
- * of this node.
+ * of this node as used in JLS3.
*
* @return the property descriptor
*/
abstract ChildListPropertyDescriptor internalModifiers2Property();
/**
+ * Returns structural property descriptor for the "modifiers" property
+ * of this node as used in JLS3.
+ *
+ * @return the property descriptor
+ * @since 3.1
+ */
+ public final ChildListPropertyDescriptor getModifiersProperty() {
+ // important: return property for AST.JLS3
+ return internalModifiers2Property();
+ }
+
+ /**
* Returns structural property descriptor for the "javadoc" property
* of this node.
*
@@ -103,6 +115,17 @@ public abstract class BodyDeclaration extends ASTNode {
abstract ChildPropertyDescriptor internalJavadocProperty();
/**
+ * Returns structural property descriptor for the "javadoc" property
+ * of this node.
+ *
+ * @return the property descriptor
+ * @since 3.1
+ */
+ public final ChildPropertyDescriptor getJavadocProperty() {
+ return internalJavadocProperty();
+ }
+
+ /**
* Creates and returns a structural property descriptor for the
* "javadoc" property declared on the given concrete node type.
*
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SingleVariableDeclaration.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SingleVariableDeclaration.java
index 3dd01d21f0..8e44c29c54 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SingleVariableDeclaration.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SingleVariableDeclaration.java
@@ -210,6 +210,30 @@ public class SingleVariableDeclaration extends VariableDeclaration {
}
/* (omit javadoc for this method)
+ * Method declared on VariableDeclaration.
+ * @since 3.1
+ */
+ final SimplePropertyDescriptor internalExtraDimensionsProperty() {
+ return EXTRA_DIMENSIONS_PROPERTY;
+ }
+
+ /* (omit javadoc for this method)
+ * Method declared on VariableDeclaration.
+ * @since 3.1
+ */
+ final ChildPropertyDescriptor internalInitializerProperty() {
+ return INITIALIZER_PROPERTY;
+ }
+
+ /* (omit javadoc for this method)
+ * Method declared on VariableDeclaration.
+ * @since 3.1
+ */
+ final ChildPropertyDescriptor internalNameProperty() {
+ return NAME_PROPERTY;
+ }
+
+ /* (omit javadoc for this method)
* Method declared on ASTNode.
*/
final List internalStructuralPropertiesForType(int apiLevel) {
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclaration.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclaration.java
index 7ac5325c1d..06281eab5f 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclaration.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclaration.java
@@ -29,6 +29,66 @@ package org.eclipse.jdt.core.dom;
public abstract class VariableDeclaration extends ASTNode {
/**
+ * Returns structural property descriptor for the "extraDimensions" property
+ * of this node.
+ *
+ * @return the property descriptor
+ * @since 3.1
+ */
+ abstract SimplePropertyDescriptor internalExtraDimensionsProperty();
+
+ /**
+ * Returns structural property descriptor for the "extraDimensions" property
+ * of this node.
+ *
+ * @return the property descriptor
+ * @since 3.1
+ */
+ public final SimplePropertyDescriptor getExtraDimensionsProperty() {
+ return internalExtraDimensionsProperty();
+ }
+
+ /**
+ * Returns structural property descriptor for the "initializer" property
+ * of this node.
+ *
+ * @return the property descriptor
+ * @since 3.1
+ */
+ abstract ChildPropertyDescriptor internalInitializerProperty();
+
+ /**
+ * Returns structural property descriptor for the "initializer" property
+ * of this node.
+ *
+ * @return the property descriptor
+ * @since 3.1
+ */
+ public final ChildPropertyDescriptor getInitializerProperty() {
+ return internalInitializerProperty();
+ }
+
+ /**
+ * Returns structural property descriptor for the "name" property
+ * of this node.
+ *
+ * @return the property descriptor
+ * @since 3.1
+ */
+ abstract ChildPropertyDescriptor internalNameProperty();
+
+ /**
+ * Returns structural property descriptor for the "name" property
+ * of this node.
+ *
+ * @return the property descriptor
+ * @since 3.1
+ */
+ public final ChildPropertyDescriptor getNameProperty() {
+ return internalNameProperty();
+ }
+
+ /**
* Creates a new AST node for a variable declaration owned by the given AST.
* <p>
* N.B. This constructor is package-private.
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclarationFragment.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclarationFragment.java
index 11cba17b88..80d11af9b4 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclarationFragment.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclarationFragment.java
@@ -115,6 +115,30 @@ public class VariableDeclarationFragment extends VariableDeclaration {
}
/* (omit javadoc for this method)
+ * Method declared on VariableDeclaration.
+ * @since 3.1
+ */
+ final SimplePropertyDescriptor internalExtraDimensionsProperty() {
+ return EXTRA_DIMENSIONS_PROPERTY;
+ }
+
+ /* (omit javadoc for this method)
+ * Method declared on VariableDeclaration.
+ * @since 3.1
+ */
+ final ChildPropertyDescriptor internalInitializerProperty() {
+ return INITIALIZER_PROPERTY;
+ }
+
+ /* (omit javadoc for this method)
+ * Method declared on VariableDeclaration.
+ * @since 3.1
+ */
+ final ChildPropertyDescriptor internalNameProperty() {
+ return NAME_PROPERTY;
+ }
+
+ /* (omit javadoc for this method)
* Method declared on ASTNode.
*/
final List internalStructuralPropertiesForType(int apiLevel) {

Back to the top