You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2010/07/07 20:28:26 UTC

svn commit: r961466 - in /tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc: def/ServiceDef.java services/ServiceLifecycleSource.java

Author: hlship
Date: Wed Jul  7 18:28:26 2010
New Revision: 961466

URL: http://svn.apache.org/viewvc?rev=961466&view=rev
Log:
Correct some JavaDoc innaccuracies

Modified:
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/def/ServiceDef.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/ServiceLifecycleSource.java

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/def/ServiceDef.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/def/ServiceDef.java?rev=961466&r1=961465&r2=961466&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/def/ServiceDef.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/def/ServiceDef.java Wed Jul  7 18:28:26 2010
@@ -1,10 +1,10 @@
-// Copyright 2006, 2007, 2009 The Apache Software Foundation
+// Copyright 2006, 2007, 2009, 2010 The Apache Software Foundation
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
 //
-//     http://www.apache.org/licenses/LICENSE-2.0
+// http://www.apache.org/licenses/LICENSE-2.0
 //
 // Unless required by applicable law or agreed to in writing, software
 // distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,6 +16,8 @@ package org.apache.tapestry5.ioc.def;
 
 import org.apache.tapestry5.ioc.ObjectCreator;
 import org.apache.tapestry5.ioc.ServiceBuilderResources;
+import org.apache.tapestry5.ioc.ServiceLifecycle;
+import org.apache.tapestry5.ioc.services.ServiceLifecycleSource;
 
 import java.util.Set;
 
@@ -23,12 +25,14 @@ import java.util.Set;
  * Service definition derived, by default, from a service builder method. This has been extended in Tapestry 5.1 with
  * {@link org.apache.tapestry5.ioc.def.ServiceDef2}, which adds additional methods.
  */
+@SuppressWarnings("rawtypes")
 public interface ServiceDef
 {
     /**
      * Returns an {@link ObjectCreator} that can create the core service implementation.
-     *
-     * @param resources used to resolve dependencies of the service, or access its configuration
+     * 
+     * @param resources
+     *            used to resolve dependencies of the service, or access its configuration
      * @return an object that can (later) be used to instantiate the service itself
      */
     ObjectCreator createServiceCreator(ServiceBuilderResources resources);
@@ -41,12 +45,13 @@ public interface ServiceDef
     String getServiceId();
 
     /**
-     * Returns an optional <em>marker annotation</em>. Marker annotations are used to disambiguate services; the
+     * Returns an optional set of <em>marker annotations</em>. Marker annotations are used to disambiguate services; the
      * combination of a marker annotation and a service type is expected to be unique. The annotation is placed on the
      * field or method/constructor parameter and the service is located by combining the marker with service type (the
      * parameter or field type).
-     *
-     * @return the annotation, or null if the service has no annotation
+     * 
+     * @return the marker annotations for the service (possibly empty), including any default marker annotations
+     *         from the containing module.
      */
     Set<Class> getMarkers();
 
@@ -54,21 +59,24 @@ public interface ServiceDef
      * Returns the service interface associated with this service. This is the interface exposed to the outside world,
      * as well as the one used to build proxies. In cases where the service is <em>not</em> defined in terms of an
      * interface, this will return the actual implementation class of the service. Services without a true service
-     * interfaced are <strong>not proxied</strong>.
+     * interface are <strong>not proxied</strong>, which has a number of ramifications (such as losing lazy
+     * instantiation capabilities and other more interesting lifecycles).
      */
     Class getServiceInterface();
 
     /**
-     * Returns the lifecycle defined for the service. This is indicated by adding a {@link
-     * org.apache.tapestry5.ioc.annotations.Scope} annotation to the service builder method for the service.
+     * Returns the lifecycle defined for the service. This is indicated by adding a
+     * {@link org.apache.tapestry5.ioc.annotations.Scope} annotation to the service builder method for the service.
      * <p/>
      * Services that are not proxied will ignore their scope; such services are always treated as singletons.
+     * @see ServiceLifecycle
+     * @see ServiceLifecycleSource
      */
     String getServiceScope();
 
     /**
      * Returns true if the service should be eagerly loaded at Registry startup.
-     *
+     * 
      * @see org.apache.tapestry5.ioc.annotations.EagerLoad
      */
     boolean isEagerLoad();

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/ServiceLifecycleSource.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/ServiceLifecycleSource.java?rev=961466&r1=961465&r2=961466&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/ServiceLifecycleSource.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/ServiceLifecycleSource.java Wed Jul  7 18:28:26 2010
@@ -1,10 +1,10 @@
-// Copyright 2006, 2008 The Apache Software Foundation
+// Copyright 2006, 2008, 2010 The Apache Software Foundation
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
 //
-//     http://www.apache.org/licenses/LICENSE-2.0
+// http://www.apache.org/licenses/LICENSE-2.0
 //
 // Unless required by applicable law or agreed to in writing, software
 // distributed under the License is distributed on an "AS IS" BASIS,
@@ -21,15 +21,15 @@ import org.apache.tapestry5.ioc.annotati
  * Provides access to user defined lifecycles (beyond the two built-in lifecycles: "singleton" and "primitive"). The
  * user defined lifecycles are contributed into the service's configuration.
  * <p/>
- * Note that the scope {@linkplain org.apache.tapestry5.ioc.ScopeConstants#DEFAULT default} is special and not a
- * contribution.
+ * Note that the default scope {@linkplain org.apache.tapestry5.ioc.ScopeConstants#DEFAULT "singleton"} is special and
+ * not a contribution.
  */
 @UsesMappedConfiguration(ServiceLifecycle.class)
 public interface ServiceLifecycleSource
 {
     /**
      * Used to locate a configuration lifecycle, by name.
-     *
+     * 
      * @param scope
      * @return the named lifecycle, or null if the name is not found
      */