Author: pderop
Date: Fri Feb 19 12:54:30 2016
New Revision: 1731238

URL: http://svn.apache.org/viewvc?rev=1731238&view=rev
Log:
Fixed some javadocs.

Modified:
    
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/BundleDependencyBuilder.java
    
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/ComponentBuilder.java
    
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.java
    
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/FactoryPidAdapterBuilder.java
    
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/FluentProperty.java
    
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/ServiceAspectBuilder.java
    
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/ServiceCallbacksBuilder.java
    
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/ServiceDependencyBuilder.java
    
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/callbacks/CbConfiguration.java
    
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/callbacks/CbConfigurationComponent.java
    
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/callbacks/InstanceCbComponent.java
    
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/callbacks/InstanceCbConfiguration.java
    
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/callbacks/InstanceCbConfigurationComponent.java

Modified: 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/BundleDependencyBuilder.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/BundleDependencyBuilder.java?rev=1731238&r1=1731237&r2=1731238&view=diff
==============================================================================
--- 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/BundleDependencyBuilder.java
 (original)
+++ 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/BundleDependencyBuilder.java
 Fri Feb 19 12:54:30 2016
@@ -94,7 +94,7 @@ public interface BundleDependencyBuilder
 
     /**
      * Sets property propagation. If set to <code>true</code> any bundle 
manifest properties will be added
-     * to the service properties of the component that has this dependency (if 
it registers as a service).
+     * to the service properties of the component that declares this 
dependency (if it provides a service).
      * 
      * @param propagate <code>true</code> to propagate the bundle manifest 
properties
      * @return the bundle dependency builder
@@ -173,7 +173,7 @@ public interface BundleDependencyBuilder
     
     /**
      * Specifies a callback instance used to invoke the reflection based 
callbacks on it.
-     * @param callbackInstance the instance to invoke the callbacks on
+     * @param callbackInstance the instance to invoke the reflection based 
callbacks on
      * @return this builder
      * @see #add(String)
      * @see #change(String)

Modified: 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/ComponentBuilder.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/ComponentBuilder.java?rev=1731238&r1=1731237&r2=1731238&view=diff
==============================================================================
--- 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/ComponentBuilder.java
 (original)
+++ 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/ComponentBuilder.java
 Fri Feb 19 12:54:30 2016
@@ -46,7 +46,7 @@ public interface ComponentBuilder<B exte
     B impl(Object impl);   
     
     /**
-     * Sets the factory to use to create the implementation. You can specify 
both the factory class and method to invoke. The method should return the 
implementation, 
+     * Sets the factory to use when creating the implementation. You can 
specify both the factory class and method to invoke. The method should return 
the implementation, 
      * and can use any method to create it. Actually, this can be used 
together with setComposition to create a composition of instances that work 
together to implement 
      * a component. The factory itself can also be instantiated lazily by not 
specifying an instance, but a Class. 
      * 
@@ -88,7 +88,7 @@ public interface ComponentBuilder<B exte
     /**
      * Configures a factory used to create this component implementation using 
a Factory object and a "getComposition" factory method.
      * the Factory method may then return multiple objects that will be part 
of this component implementation, and 
-     * all of them will be searched for injecting any of the dependencies.
+     * all of them will be searched when injecting any of the dependencies.
      * 
      * Example:
      * 
@@ -424,7 +424,7 @@ public interface ComponentBuilder<B exte
      * This method is useful because when it is invoked, all required 
dependencies defines in the Activator
      * are already injected, and you can then add more extra dependencies from 
the init() method.
      * And once all extra dependencies will be available and injected, then 
the "start" callback will be invoked.
-     * The dependency manager will look for a method of this name with the 
following signatures,
+     * <p>The dependency manager will look for a method of this name with the 
following signatures,
      * in this order:
      * <ol>
      * <li>method(Component component)</li>
@@ -438,7 +438,7 @@ public interface ComponentBuilder<B exte
     
     /**
      * Sets the name of the method used as the "start" callback. This method, 
when found, is
-     * invoked as part of the life cycle management of the component 
implementation. The
+     * invoked as part of the life cycle management of the component 
implementation. <p>The
      * dependency manager will look for a method of this name with the 
following signatures,
      * in this order:
      * <ol>
@@ -453,7 +453,7 @@ public interface ComponentBuilder<B exte
     
     /**
      * Sets the name of the method used as the "stop" callback. This method, 
when found, is
-     * invoked as part of the life cycle management of the component 
implementation. The
+     * invoked as part of the life cycle management of the component 
implementation. <p>The
      * dependency manager will look for a method of this name with the 
following signatures,
      * in this order:
      * <ol>
@@ -468,7 +468,7 @@ public interface ComponentBuilder<B exte
     
     /**
      * Sets the name of the method used as the "destroy" callback. This 
method, when found, is
-     * invoked as part of the life cycle management of the component 
implementation. The
+     * invoked as part of the life cycle management of the component 
implementation. <p>The
      * dependency manager will look for a method of this name with the 
following signatures,
      * in this order:
      * <ol>

Modified: 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.java?rev=1731238&r1=1731237&r2=1731238&view=diff
==============================================================================
--- 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.java
 (original)
+++ 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/ConfigurationDependencyBuilder.java
 Fri Feb 19 12:54:30 2016
@@ -156,7 +156,9 @@ public interface ConfigurationDependency
         
     /**
      * Sets a callback method to call on the component implementation 
class(es) when the configuration is updated. When the configuration is lost, 
the callback is invoked
-     * with a null dictionary. The following callback signatures are supported 
and searched in the following order:
+     * with a null dictionary. 
+     * 
+     * <p>The following callback signatures are supported and searched in the 
following order:
      * <ol>
      * <li>method(Dictionary)</li>
      * <li>method(Component, Dictionary)</li>
@@ -171,6 +173,14 @@ public interface ConfigurationDependency
      * Sets a callback method to call on the component implementation 
class(es) when the configuration is updated. The callback is invoked with a 
configuration type
      * argument (null if the configuration is lost).
      * 
+     * <p>The following callback signatures are supported and searched in the 
following order:
+     * <ol>
+     * <li>method(Dictionary)</li>
+     * <li>method(Component, Dictionary)</li>
+     * <li>method(Configuration) // same type as the one specified in the 
"configType" argument</li>
+     * <li>method(Component, Configuration) // Configuration has the same type 
as the one specified in the "configType" argument</li>
+     * </ol>
+     * 
      * @param configType the type of a configuration that is passed as 
argument to the callback
      * @param updateMethod the callback to call on the component instance(s) 
when the configuration is updated.
      * @return this builder
@@ -202,6 +212,14 @@ public interface ConfigurationDependency
      * component implementation instance(s).
      * The callback is invoked with a configuration type argument (null of the 
configuration is lost).
      * 
+     * <p>The following callback signatures are supported and searched in the 
following order:
+     * <ol>
+     * <li>method(Dictionary)</li>
+     * <li>method(Component, Dictionary)</li>
+     * <li>method(Configuration) // same type as the one specified in the 
"configType" argument</li>
+     * <li>method(Component, Configuration) // Configuration has the same type 
as the one specified in the "configType" argument</li>
+     * </ol>
+     * 
      * @param configType the type of a configuration that is passed as 
argument to the callback
      * @param callbackInstance the object instance on which the updatedMethod 
is invoked
      * @param updateMethod the callback to call on the callbackInstance when 
the configuration is updated.
@@ -244,7 +262,7 @@ public interface ConfigurationDependency
     <T, U> ConfigurationDependencyBuilder update(Class<U> configType, 
CbConfiguration<T, U> callback);
     
     /**
-     * Sets a reference to a "callback(configType, Component)" method from one 
of the component implementation classes. 
+     * Sets a reference to a "callback(Configuration, Component)" method from 
one of the component implementation classes. 
      * The method is invoked with two args: configuration type, Component. The 
configuration type argument is null if the configuration is lost.
      *
      * @param <T> The type of the target component implementation class on 
which the method is invoked
@@ -275,7 +293,7 @@ public interface ConfigurationDependency
     ConfigurationDependencyBuilder update(InstanceCbDictionaryComponent 
callback);
 
     /**
-     * Sets a reference to a "callback(ConfigType)" method from an Object 
instance. The configuration type argument is null if the configuration is lost.
+     * Sets a reference to a "callback(Configuration)" method from an Object 
instance. The configuration type argument is null if the configuration is lost.
      *
      * @param <T> the type of the configuration interface accepted by the 
callback method.
      * @param configType the class of the configuration that is passed as 
argument to the callback

Modified: 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/FactoryPidAdapterBuilder.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/FactoryPidAdapterBuilder.java?rev=1731238&r1=1731237&r2=1731238&view=diff
==============================================================================
--- 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/FactoryPidAdapterBuilder.java
 (original)
+++ 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/FactoryPidAdapterBuilder.java
 Fri Feb 19 12:54:30 2016
@@ -17,8 +17,10 @@ import org.apache.felix.dm.lambda.callba
  * 
  * This builded supports type safe configuration types. For a given factory 
configuration, you can specify an interface of your choice,
  * and DM will implement it using a dynamic proxy that converts interface 
methods to lookups in the actual factory configuration dictionary. 
+ * For more information about configuration types, please refer to {@link 
ConfigurationDependencyBuilder}.
  * 
- * <p> Example that defines a factory configuration adapter service for the 
"foo.bar" factory pid:
+ * <p> Example that defines a factory configuration adapter service for the 
"foo.bar" factory pid. For each factory pid instance, 
+ * an instance of the DictionaryImpl component will be created.
  * 
  * <pre> {@code
  * public class Activator extends DependencyManagerActivator {
@@ -64,16 +66,16 @@ public interface FactoryPidAdapterBuilde
     FactoryPidAdapterBuilder factoryPid(String pid);
         
     /**
-     * Specifies if the public properties (not starting with a dot) should be 
propagated in the adapter service properties (false by default).
+     * Specifies if the public properties (not starting with a dot) should be 
propagated to the adapter service properties (false by default).
      * 
      * @return this builder.
      */
     FactoryPidAdapterBuilder propagate();
     
     /**
-     * Specifies if the public properties (not starting with a dot) should be 
propagated in the adapter service properties (false by default).
+     * Specifies if the public properties (not starting with a dot) should be 
propagated to the adapter service properties (false by default).
      * 
-     * @param propagate true if the public properties should be propagated in 
the adapter service properties (false by default).
+     * @param propagate true if the public properties should be propagated to 
the adapter service properties (false by default).
      * @return this builder.
      */
     FactoryPidAdapterBuilder propagate(boolean propagate);
@@ -82,12 +84,12 @@ public interface FactoryPidAdapterBuilde
      * Specifies a callback method that will be called on the component 
instances when the configuration is injected.
      * 
      * @param updateMethod the method to call on the component instances when 
the configuration is available ("updated" by default).
-     * The following method signatures are supported:
      * 
-     * <pre> {@code
-     *    method(Dictionary properties)
-     *    method(Component component, Dictionary properties)
-     * }</pre>
+     * <p>The following method signatures are supported:
+     * <ol>
+     * <li> method(Dictionary properties)
+     * <li> method(Component component, Dictionary properties)
+     * </ol>
      * 
      * @return this builder
      */
@@ -97,6 +99,14 @@ public interface FactoryPidAdapterBuilde
      * Sets a callback method to call on the component implementation 
class(es) when the configuration is updated. 
      * The callback is invoked with a configuration type argument.
      * 
+     * <p>The following callback signatures are supported and searched in the 
following order:
+     * <ol>
+     * <li>method(Dictionary)</li>
+     * <li>method(Component, Dictionary)</li>
+     * <li>method(Configuration) // same type as the one specified in the 
"configType" argument</li>
+     * <li>method(Component, Configuration) // Configuration has the same type 
as the one specified in the "configType" argument</li>
+     * </ol>
+     * 
      * @param configType the type of a configuration that is passed as 
argument to the callback
      * @param updateMethod the callback to call on the component instance(s) 
when the configuration is updated.
      * @return this builder
@@ -123,6 +133,14 @@ public interface FactoryPidAdapterBuilde
      * Specifies a callback instance method that will be called on a given 
object instance when the configuration is injected.
      * The callback is invoked with a configuration type argument.
      * 
+     * <p>The following callback signatures are supported and searched in the 
following order:
+     * <ol>
+     * <li>method(Dictionary)</li>
+     * <li>method(Component, Dictionary)</li>
+     * <li>method(Configuration) // same type as the one specified in the 
"configType" argument</li>
+     * <li>method(Component, Configuration) // Configuration has the same type 
as the one specified in the "configType" argument</li>
+     * </ol>
+     * 
      * @param configType the type of a configuration that is passed as 
argument to the callback
      * @param callbackInstance the Object instance on which the updated 
callback will be invoked.
      * @param updateMethod the method to call on the given object instance 
when the configuration is available. The callback is invoked
@@ -157,7 +175,7 @@ public interface FactoryPidAdapterBuilde
      * Specifies a method reference that will be called on one of the 
component classes when the configuration is injected
      * 
      * @param <T> the type of the component implementation class on which the 
callback is invoked on.
-     * @param callback the reference to a method on one of the component 
classes. The method may takes as parameter a Dictionary and a Component.
+     * @param callback the reference to a method on one of the component 
classes. The method may takes as arguments a Dictionary and a Component.
      * @return this builder
      */
     <T> FactoryPidAdapterBuilder update(CbDictionaryComponent<T> callback);
@@ -169,7 +187,7 @@ public interface FactoryPidAdapterBuilde
      * @param <T> the type of the component implementation class on which the 
callback is invoked on.
      * @param <U> the configuration type accepted by the callback method.
      * @param configType the type of a configuration that is passed as 
argument to the callback
-     * @param callback the reference to a method on one of the component 
classes. The method may takes as parameter a configuration type and a Component.
+     * @param callback the reference to a method on one of the component 
classes. The method may takes as arguments a configuration type and a Component.
      * @return this builder
      */
     <T, U> FactoryPidAdapterBuilder update(Class<U> configType, 
CbConfigurationComponent<T, U> callback);
@@ -209,7 +227,7 @@ public interface FactoryPidAdapterBuilde
      * 
      * @param <T> the configuration type accepted by the callback method.
      * @param configType the type of a configuration that is passed as 
argument to the callback
-     * @param callback the method to call on a given object instance when the 
configuration is available. The callback takes as argument a
+     * @param callback the method to call on a given object instance when the 
configuration is available. The callback takes as arguments a
      * configuration type, and a Component parameter. 
      * @return this builder
      */

Modified: 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/FluentProperty.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/FluentProperty.java?rev=1731238&r1=1731237&r2=1731238&view=diff
==============================================================================
--- 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/FluentProperty.java
 (original)
+++ 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/FluentProperty.java
 Fri Feb 19 12:54:30 2016
@@ -5,7 +5,7 @@ import org.apache.felix.dm.lambda.callba
 /**
  * Lambda allowing to define fluent service properties. Property names are 
deduces from the lambda parameter name.
  * 
- * <p> Example of a component which provides fluent properties ("foo=bar"; 
"foo2=Integer(123)):
+ * <p> Example of a component which provides fluent properties {"foo"="bar"; 
"foo2"=Integer(123)}:
  * 
  * <pre>{@code
  * public class Activator extends DependencyManagerActivator {

Modified: 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/ServiceAspectBuilder.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/ServiceAspectBuilder.java?rev=1731238&r1=1731237&r2=1731238&view=diff
==============================================================================
--- 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/ServiceAspectBuilder.java
 (original)
+++ 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/ServiceAspectBuilder.java
 Fri Feb 19 12:54:30 2016
@@ -7,7 +7,7 @@ package org.apache.felix.dm.lambda;
  * The aspect will be registered with the same interface and properties as the 
original service, plus any extra properties you supply here.
  * Multiple Aspects of the same service are chained and ordered using aspect 
ranks.
  * 
- * <p> Code example that provides a "LogService" aspect that performs 
spell-checking of each log message. 
+ * <p> Code example which provides a "LogService" aspect that performs 
spell-checking of each log message. 
  * The aspect decorates a LogService. The aspect also depends on an Dictionary 
service that is internally used to perform log spell checking.
  * The LogService and Dictionary services are injected in the aspect 
implementation using reflection on class fields:
  * 

Modified: 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/ServiceCallbacksBuilder.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/ServiceCallbacksBuilder.java?rev=1731238&r1=1731237&r2=1731238&view=diff
==============================================================================
--- 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/ServiceCallbacksBuilder.java
 (original)
+++ 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/ServiceCallbacksBuilder.java
 Fri Feb 19 12:54:30 2016
@@ -24,8 +24,6 @@ import org.apache.felix.dm.lambda.callba
 /**
  * Builds a service dependency callback (required by default).
  * 
- * TODO: fix javadoc for method reference (do the same as in 
ConfigurationDependencyBuilder: use double quotes ...
- * 
  * A Service may be injected in a bind-method of a component or an object 
instance using this builder.
  * The builder supports reflection based callbacks (same as with the original 
DM API), as well as java8 method reference based callbacks.
  * 
@@ -62,23 +60,23 @@ import org.apache.felix.dm.lambda.callba
  * swapMethod(ServiceReference<S> oldRef, S old, ServiceReference<S> newRef, S 
newService, Component component)
  * }</pre>
  * 
- * <p> Here is an example of a Component that defines a dependency of a 
LogService which is injected in the "bindLogService" method using a 
ServiceCallbacksBuilder:
- * The withSvc(...)" declaration defines a method reference on the 
"ComponentImpl::bindLogService" method (using a lambda):
+ * <p> Here is an example of a Component that defines a dependency of a 
LogService which is injected in the "setLog" method using a 
ServiceCallbacksBuilder:
+ * The withSvc(...)" declaration defines a method reference on the 
"Pojo::setLog" method (using a lambda):
  * 
  * <pre> {@code
  * public class Activator extends DependencyManagerActivator {
  *    public void init(BundleContext ctx, DependencyManager dm) throws 
Exception { 
- *       component(comp -> 
comp.impl(ComponentImpl.class).withSvc(LogService.class, log -> 
log.add(ComponentImpl::bindLogService)));
+ *       component(comp -> comp.impl(Pojo.class).withSvc(LogService.class, log 
-> log.add(Pojo::setLog)));
  *    }
  * }}</pre>
  *
- * <p> Same example, but we inject the dependency in an object instance that 
we already have in hand:
+ * <p> Same example, but we inject the dependency to an object instance that 
we already have in hand:
  * 
  * <pre> {@code
  * public class Activator extends DependencyManagerActivator {
  *    public void init(BundleContext ctx, DependencyManager dm) throws 
Exception {
- *       ComponentImpl impl = new ComponentImpl();
- *       component(comp -> comp.impl(impl).withSvc(LogService.class, log -> 
log.add(impl::bindLogService)));
+ *       Pojo impl = new Pojo();
+ *       component(comp -> comp.impl(impl).withSvc(LogService.class, log -> 
log.add(impl::setLog)));
  *    }
  * }}</pre>
  * 
@@ -87,17 +85,7 @@ import org.apache.felix.dm.lambda.callba
  * <pre> {@code
  * public class Activator extends DependencyManagerActivator {
  *    public void init(BundleContext ctx, DependencyManager dm) throws 
Exception {
- *       component(comp -> 
comp.impl(ComponentImpl::class).withSvc(LogService.class, log -> 
log.add("bindLogService")));
- *    }
- * }}</pre>
- *
- * <p> Same example, but we inject the dependency in an object instance that 
we already have in hand:
- * 
- * <pre> {@code
- * public class Activator extends DependencyManagerActivator {
- *    public void init(BundleContext ctx, DependencyManager dm) throws 
Exception {
- *       ComponentImpl impl = new ComponentImpl();
- *       component(comp -> comp.impl(impl).withSvc(LogService.class, log -> 
log.callbackInstance(impl).add("bindLogService")));
+ *       component(comp -> comp.impl(Pojo::class).withSvc(LogService.class, 
log -> log.add("setLog")));
  *    }
  * }}</pre>
  *

Modified: 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/ServiceDependencyBuilder.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/ServiceDependencyBuilder.java?rev=1731238&r1=1731237&r2=1731238&view=diff
==============================================================================
--- 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/ServiceDependencyBuilder.java
 (original)
+++ 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/ServiceDependencyBuilder.java
 Fri Feb 19 12:54:30 2016
@@ -13,8 +13,6 @@ import org.osgi.framework.ServiceReferen
  * control the default mode (required or optional) using the 
"org.apache.felix.dependencymanager.lambda.dependencymode"
  * system property which can be set to either "required" or "optional" 
("required" by default).
  * 
- * Unlike with original DM, dependencies are required by default.
- *
  * @param <S> the type of the service dependency
  */
 public interface ServiceDependencyBuilder<S> extends 
DependencyBuilder<ServiceDependency>, ServiceCallbacksBuilder<S, 
ServiceDependencyBuilder<S>> {
@@ -107,7 +105,7 @@ public interface ServiceDependencyBuilde
     ServiceDependencyBuilder<S> defImpl(Object defaultImpl);
     
     /**
-     * Sets a timeout for this dependency. A timed dependency blocks the 
invoker thread is the required dependency is currently unavailable, until it 
comes up again.
+     * Sets a timeout for this dependency. A timed dependency blocks the 
invoker thread if the required dependency is currently unavailable, until it 
comes up again.
      * @param timeout the timeout to wait in milliseconds when the service 
disappears. If the timeout expires, an IllegalStateException is thrown
      * when the missing service is invoked.
      * 

Modified: 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/callbacks/CbConfiguration.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/callbacks/CbConfiguration.java?rev=1731238&r1=1731237&r2=1731238&view=diff
==============================================================================
--- 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/callbacks/CbConfiguration.java
 (original)
+++ 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/callbacks/CbConfiguration.java
 Fri Feb 19 12:54:30 2016
@@ -1,66 +1,20 @@
 package org.apache.felix.dm.lambda.callbacks;
 
-import java.util.Collection;
 import java.util.Dictionary;
-import java.util.Map;
 import java.util.Objects;
 
+import org.apache.felix.dm.lambda.ConfigurationDependencyBuilder;
+
 /**
  * Represents a callback(Configuration) that is invoked on a Component 
implementation class. 
- * The callback which accepts a type-safe configuration class for wrapping 
properties behind a dynamic proxy interface.
+ * The callback accepts a type-safe configuration class for wrapping 
properties behind a dynamic proxy interface.
  * 
  * <p> The T generic parameter represents the type of the class on which the 
callback is invoked on. 
  * <p> The U generic parameter represents the type of the configuration class 
passed to the callback argument. 
  * 
- * <p> Using such callback provides a way for creating type-safe 
configurations from a actual {@link Map} or {@link Dictionary} that is
+ * <p> Using such callback provides a way for creating type-safe 
configurations from the actual {@link Dictionary} that is
  * normally injected by Dependency Manager.
- * The callback accepts in argument an interface that you have to provide, and 
DM will inject a proxy that converts
- * method calls from your configuration-type to lookups in the actual map or 
dictionary. The results of these lookups are then
- * converted to the expected return type of the invoked configuration 
method.<br>
- * As proxies are injected, no implementations of the desired 
configuration-type are necessary!
- * </p>
- * <p>
- * The lookups performed are based on the name of the method called on the 
configuration type. The method names are
- * "mangled" to the following form: <tt>[lower case letter] [any valid 
character]*</tt>. Method names starting with
- * <tt>get</tt> or <tt>is</tt> (JavaBean convention) are stripped from these 
prefixes. For example: given a dictionary
- * with the key <tt>"foo"</tt> can be accessed from a configuration-type using 
the following method names:
- * <tt>foo()</tt>, <tt>getFoo()</tt> and <tt>isFoo()</tt>.
- * </p>
- * <p>
- * The return values supported are: primitive types (or their object 
wrappers), strings, enums, arrays of
- * primitives/strings, {@link Collection} types, {@link Map} types, {@link 
Class}es and interfaces. When an interface is
- * returned, it is treated equally to a configuration type, that is, it is 
returned as a proxy.
- * </p>
- * <p>
- * Arrays can be represented either as comma-separated values, optionally 
enclosed in square brackets. For example:
- * <tt>[ a, b, c ]</tt> and <tt>a, b,c</tt> are both considered an array of 
length 3 with the values "a", "b" and "c".
- * Alternatively, you can append the array index to the key in the dictionary 
to obtain the same: a dictionary with
- * "arr.0" =&gt; "a", "arr.1" =&gt; "b", "arr.2" =&gt; "c" would result in the 
same array as the earlier examples.
- * </p>
- * <p>
- * Maps can be represented as single string values similarly as arrays, each 
value consisting of both the key and value
- * separated by a dot. Optionally, the value can be enclosed in curly 
brackets. Similar to array, you can use the same
- * dot notation using the keys. For example, a dictionary with 
- * 
- * <pre>{@code "map" => "{key1.value1, key2.value2}"}</pre> 
- * 
- * and a dictionary with <p>
- * 
- * <pre>{@code "map.key1" => "value1", "map2.key2" => "value2"}</pre> 
- * 
- * result in the same map being returned.
- * Instead of a map, you could also define an interface with the methods 
<tt>getKey1()</tt> and <tt>getKey2</tt> and use
- * that interface as return type instead of a {@link Map}.
- * 
- * <p>
- * In case a lookup does not yield a value from the underlying map or 
dictionary, the following rules are applied:
- * <ol>
- * <li>primitive types yield their default value, as defined by the Java 
Specification;
- * <li>string, {@link Class}es and enum values yield <code>null</code>;
- * <li>for arrays, collections and maps, an empty array/collection/map is 
returned;
- * <li>for other interface types that are treated as configuration type a 
null-object is returned.
- * </ol>
- * </p>
+ * For more information about configuration types, please refer to {@link 
ConfigurationDependencyBuilder}.
  * 
  * @author <a href="mailto:[email protected]";>Felix Project Team</a>
  */

Modified: 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/callbacks/CbConfigurationComponent.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/callbacks/CbConfigurationComponent.java?rev=1731238&r1=1731237&r2=1731238&view=diff
==============================================================================
--- 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/callbacks/CbConfigurationComponent.java
 (original)
+++ 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/callbacks/CbConfigurationComponent.java
 Fri Feb 19 12:54:30 2016
@@ -1,16 +1,22 @@
 package org.apache.felix.dm.lambda.callbacks;
 
+import java.util.Dictionary;
 import java.util.Objects;
 
 import org.apache.felix.dm.Component;
+import org.apache.felix.dm.lambda.ConfigurationDependencyBuilder;
 
 /**
  * Represents a callback(Configuration, Component) which accepts a 
configuration type for wrapping properties
- * behind a dynamic proxy interface. For more informations about configuration 
type, please refer to {@link CbConfiguration}.
+ * behind a dynamic proxy interface.
  * 
  * <p> The T generic parameter represents the type of the class on which the 
callback is invoked on. 
  * <p> The U generic parameter represents the type of the configuration class 
passed to the callback argument. 
  * 
+ * <p> Using such callback provides a way for creating type-safe 
configurations from the actual {@link Dictionary} that is
+ * normally injected by Dependency Manager.
+ * For more information about configuration types, please refer to {@link 
ConfigurationDependencyBuilder}.
+ * 
  * @author <a href="mailto:[email protected]";>Felix Project Team</a>
  */
 @FunctionalInterface

Modified: 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/callbacks/InstanceCbComponent.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/callbacks/InstanceCbComponent.java?rev=1731238&r1=1731237&r2=1731238&view=diff
==============================================================================
--- 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/callbacks/InstanceCbComponent.java
 (original)
+++ 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/callbacks/InstanceCbComponent.java
 Fri Feb 19 12:54:30 2016
@@ -5,7 +5,7 @@ import java.util.Objects;
 import org.apache.felix.dm.Component;
 
 /**
- * Represents a callback(Component)  on an Object instance.
+ * Represents a callback(Component) invoked on an Object instance.
  * 
  * @author <a href="mailto:[email protected]";>Felix Project Team</a>
  */

Modified: 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/callbacks/InstanceCbConfiguration.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/callbacks/InstanceCbConfiguration.java?rev=1731238&r1=1731237&r2=1731238&view=diff
==============================================================================
--- 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/callbacks/InstanceCbConfiguration.java
 (original)
+++ 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/callbacks/InstanceCbConfiguration.java
 Fri Feb 19 12:54:30 2016
@@ -1,13 +1,19 @@
 package org.apache.felix.dm.lambda.callbacks;
 
+import java.util.Dictionary;
 import java.util.Objects;
 
+import org.apache.felix.dm.lambda.ConfigurationDependencyBuilder;
+
 /**
  * Represents a reference to a callback on an Object instance that takes 
Configuration type as argument.
- * For more informations about configuration type, please refer to {@link 
CbConfiguration}.
  * 
  * <p> The T generic parameter represents the type of the configuration class 
passed to the callback argument. 
  * 
+ * <p> Using such callback provides a way for creating type-safe 
configurations from the actual {@link Dictionary} that is
+ * normally injected by Dependency Manager.
+ * For more information about configuration types, please refer to {@link 
ConfigurationDependencyBuilder}.
+ * 
  * @author <a href="mailto:[email protected]";>Felix Project Team</a>
  */
 @FunctionalInterface

Modified: 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/callbacks/InstanceCbConfigurationComponent.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/callbacks/InstanceCbConfigurationComponent.java?rev=1731238&r1=1731237&r2=1731238&view=diff
==============================================================================
--- 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/callbacks/InstanceCbConfigurationComponent.java
 (original)
+++ 
felix/trunk/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/callbacks/InstanceCbConfigurationComponent.java
 Fri Feb 19 12:54:30 2016
@@ -1,16 +1,20 @@
 package org.apache.felix.dm.lambda.callbacks;
 
+import java.util.Dictionary;
 import java.util.Objects;
 
 import org.apache.felix.dm.Component;
+import org.apache.felix.dm.lambda.ConfigurationDependencyBuilder;
 
 /**
- * Represents a callback(Configuration, Component) that is invoked on a 
Component implementation class. 
- * The type of the class on which the callback is invoked on is represented by 
the T generic parameter.
- * For more informations about configuration type, please refer to {@link 
CbConfiguration}.
+ * Represents a callback(Configuration, Component) invoked on an Object 
instance.
  * 
  * <p> The T generic parameter represents the type of the configuration class 
passed to the callback argument. 
  * 
+ * <p> Using such callback provides a way for creating type-safe 
configurations from the actual {@link Dictionary} that is
+ * normally injected by Dependency Manager.
+ * For more information about configuration types, please refer to {@link 
ConfigurationDependencyBuilder}.
+ * 
  * @author <a href="mailto:[email protected]";>Felix Project Team</a>
  */
 @FunctionalInterface
@@ -20,7 +24,7 @@ public interface InstanceCbConfiguration
      * @param instance the Component implementation instance on which the 
callback is invoked on. 
      * @param component the callback Component 
      */
-    void accept(T instance, Component component);
+    void accept(T configType, Component component);
 
     default InstanceCbConfigurationComponent<T> 
andThen(InstanceCbConfigurationComponent<T> after) {
         Objects.requireNonNull(after);



Reply via email to