diff options
author | Lars Vogel | 2015-10-08 10:30:09 +0000 |
---|---|---|
committer | Stefan Xenos | 2015-10-13 15:26:38 +0000 |
commit | d17844220c08f1f54a0133fde8a55e16d76c179c (patch) | |
tree | 3d47e99635daf742509628718612a08e37164a0c | |
parent | 560a0b61a9a7c74b59177f8dda7d89af812a844f (diff) | |
download | rt.equinox.bundles-d17844220c08f1f54a0133fde8a55e16d76c179c.tar.gz rt.equinox.bundles-d17844220c08f1f54a0133fde8a55e16d76c179c.tar.xz rt.equinox.bundles-d17844220c08f1f54a0133fde8a55e16d76c179c.zip |
Bug 478864 - Rename Adapters.getAdapter to Adapters.adapt
Change-Id: I02c27ca3a16e093e77ea36a85ff7aba9c1d8b171
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r-- | bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/Adapters.java | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/Adapters.java b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/Adapters.java index d0e8a25b9..978eb3ed7 100644 --- a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/Adapters.java +++ b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/Adapters.java @@ -7,7 +7,7 @@ * * Contributors: * IBM Corporation - initial API and implementation - * Lars Vogel <Lars.Vogel@vogella.com> - Bug 478685 + * Lars Vogel <Lars.Vogel@vogella.com> - Bug 478685, 478864 *******************************************************************************/ package org.eclipse.core.runtime; @@ -45,7 +45,7 @@ public class Adapters { * adapter type, or null if no such representation exists */ @SuppressWarnings("unchecked") - public static <T> T getAdapter(Object sourceObject, Class<T> adapter, boolean allowActivation) { + public static <T> T adapt(Object sourceObject, Class<T> adapter, boolean allowActivation) { if (sourceObject == null) { return null; } @@ -82,16 +82,27 @@ public class Adapters { } /** + * Temporary method for the transition during the I-builds + * + * Planned to be deleted after the transition + * + * @noreference + */ + public static <T> T getAdapter(Object sourceObject, Class<T> adapter, boolean allowActivation) { + return adapt(sourceObject, adapter, allowActivation); + } + + /** * If it is possible to adapt the given object to the given type, this * returns the adapter. * <p> - * Convenient method for calling <code>getAdapter(Object, Class, true)</code>. + * Convenient method for calling <code>adapt(Object, Class, true)</code>. * <p> - * See {@link #getAdapter(Object, Class, boolean)}. + * See {@link #adapt(Object, Class, boolean)}. * */ public static <T> T adapt(Object sourceObject, Class<T> adapter) { - return getAdapter(sourceObject, adapter, true); + return adapt(sourceObject, adapter, true); } private static Object queryAdapterManager(Object sourceObject, String adapterId, boolean allowActivation) { |