aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Besedin2012-02-16 11:55:19 (EST)
committerOleg Besedin2012-02-16 11:55:19 (EST)
commit7f3e062cc8419b88cc2f49a3642fb63419c23b49 (patch)
tree974707d854a25906c3cf769b722c424f722613e5
parentaaf521c0b09d327997a36c2a7cb36ad41d879301 (diff)
downloadeclipse.platform.runtime-7f3e062cc8419b88cc2f49a3642fb63419c23b49.zip
eclipse.platform.runtime-7f3e062cc8419b88cc2f49a3642fb63419c23b49.tar.gz
eclipse.platform.runtime-7f3e062cc8419b88cc2f49a3642fb63419c23b49.tar.bz2
ContextInjectionFactory.invoke(Object,Class,IEclipseContext) should state in JavaDoc that it fails if no method found
-rw-r--r--bundles/org.eclipse.e4.core.contexts/src/org/eclipse/e4/core/contexts/ContextInjectionFactory.java12
-rw-r--r--bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/IInjector.java12
2 files changed, 21 insertions, 3 deletions
diff --git a/bundles/org.eclipse.e4.core.contexts/src/org/eclipse/e4/core/contexts/ContextInjectionFactory.java b/bundles/org.eclipse.e4.core.contexts/src/org/eclipse/e4/core/contexts/ContextInjectionFactory.java
index e29ab7f..3b06e0c 100644
--- a/bundles/org.eclipse.e4.core.contexts/src/org/eclipse/e4/core/contexts/ContextInjectionFactory.java
+++ b/bundles/org.eclipse.e4.core.contexts/src/org/eclipse/e4/core/contexts/ContextInjectionFactory.java
@@ -74,7 +74,10 @@ final public class ContextInjectionFactory {
/**
* Call a method, injecting the parameters from the context.
- *
+ * <p>
+ * If no matching method is found on the class, an InjectionException will be
+ * thrown.
+ * </p>
* @param object The object to perform injection on
* @param qualifier the annotation tagging method to be called
* @param context The context to obtain injected values from
@@ -88,7 +91,9 @@ final public class ContextInjectionFactory {
/**
* Call a method, injecting the parameters from the context.
- *
+ * <p>
+ * If no matching method is found on the class, the defaultValue will be returned.
+ * </p>
* @param object The object to perform injection on
* @param qualifier the annotation tagging method to be called
* @param context The context to obtain injected values from
@@ -109,6 +114,9 @@ final public class ContextInjectionFactory {
* If values for the same key present in both the context and the local context, the values from
* the local context are injected.
* </p>
+ * <p>
+ * If no matching method is found on the class, the defaultValue will be returned.
+ * </p>
* @param object The object to perform injection on
* @param qualifier the annotation tagging method to be called
* @param context The context to obtain injected values from
diff --git a/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/IInjector.java b/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/IInjector.java
index 97fe036..b4d08d1 100644
--- a/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/IInjector.java
+++ b/bundles/org.eclipse.e4.core.di/src/org/eclipse/e4/core/di/IInjector.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 IBM Corporation and others.
+ * Copyright (c) 2010, 2012 IBM Corporation and others.
* 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
@@ -75,6 +75,10 @@ public interface IInjector {
/**
* Call the annotated method on an object, injecting the parameters from the supplier.
+ * <p>
+ * If no matching method is found on the class, an InjectionException will be
+ * thrown.
+ * </p>
* @param object the object on which the method should be called
* @param qualifier the annotation tagging method to be called
* @param objectSupplier primary object supplier
@@ -85,6 +89,9 @@ public interface IInjector {
/**
* Call the annotated method on an object, injecting the parameters from the supplier.
+ * <p>
+ * If no matching method is found on the class, the defaultValue will be returned.
+ * </p>
* @param object the object on which the method should be called
* @param qualifier the annotation tagging method to be called
* @param defaultValue a value to be returned if the method cannot be called, might be <code>null</code>
@@ -96,6 +103,9 @@ public interface IInjector {
/**
* Call the annotated method on an object, injecting the parameters from the suppliers.
+ * <p>
+ * If no matching method is found on the class, the defaultValue will be returned.
+ * </p>
* @param object the object on which the method should be called
* @param qualifier the annotation tagging method to be called
* @param defaultValue a value to be returned if the method cannot be called, might be <code>null</code>