Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2012-08-11 22:15:18 +0000
committerStephan Herrmann2012-08-11 22:15:18 +0000
commitdeda7932d41a672c6db5ac7bb7c84b0d06ad87fb (patch)
treecdd99a84e87f07f6b54603541bb397fd8e2792bd /org.eclipse.jdt.core/dom/org
parentbbd06a961329133604a68cfd41d482a8c7aafd26 (diff)
downloadorg.eclipse.objectteams-deda7932d41a672c6db5ac7bb7c84b0d06ad87fb.tar.gz
org.eclipse.objectteams-deda7932d41a672c6db5ac7bb7c84b0d06ad87fb.tar.xz
org.eclipse.objectteams-deda7932d41a672c6db5ac7bb7c84b0d06ad87fb.zip
Bug 386587 - [refactoring] pull-up refactoring cannot handle callout
bindings - support creation of new callout bindings - support removal of callout declarations
Diffstat (limited to 'org.eclipse.jdt.core/dom/org')
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IMethodNode.java29
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodDeclaration.java6
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodSpec.java2
3 files changed, 35 insertions, 2 deletions
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IMethodNode.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IMethodNode.java
new file mode 100644
index 000000000..1fa760e23
--- /dev/null
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IMethodNode.java
@@ -0,0 +1,29 @@
+/**********************************************************************
+ * This file is part of "Object Teams Development Tooling"-Software
+ *
+ * Copyright 2012 GK Software AG
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Please visit http://www.eclipse.org/objectteams for updates and contact.
+ *
+ * Contributors:
+ * Stephan Herrmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.jdt.core.dom;
+
+import java.util.List;
+
+/**
+ * Generalization over MethodDeclaration and MethodSpec
+ * @since 3.9
+ */
+public interface IMethodNode {
+ List parameters();
+ List typeParameters();
+ Type getReturnType2();
+ void setReturnType2(Type type);
+}
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 2c602dbff..1548d203c 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
@@ -66,7 +66,11 @@ import java.util.List;
* @since 2.0
* @noinstantiate This class is not intended to be instantiated by clients.
*/
-public class MethodDeclaration extends BodyDeclaration {
+public class MethodDeclaration extends BodyDeclaration
+//{ObjectTeams: allow generalization with MethodSpec:
+ implements IMethodNode
+// SH}
+{
/**
* The "javadoc" structural property of this node type (child type: {@link Javadoc}).
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodSpec.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodSpec.java
index 5d559079c..1137ae92f 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodSpec.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodSpec.java
@@ -41,7 +41,7 @@ import java.util.List;
*
* @author jsv
*/
-public class MethodSpec extends MethodMappingElement
+public class MethodSpec extends MethodMappingElement implements IMethodNode
{
/**
* The "signature" structural property of this node type.

Back to the top