diff options
author | gjoranv <gv@oath.com> | 2018-11-22 12:18:36 +0100 |
---|---|---|
committer | gjoranv <gv@oath.com> | 2019-01-21 15:09:28 +0100 |
commit | 8cac71543fb58d54e7ad0ad30310558f7c217485 (patch) | |
tree | fb9e97f3eb5e489ddadadffa0bae710ce4a38bca /component | |
parent | 48ec139ba2d75545be4654b71740ce7745a6ec75 (diff) |
Clarify that these classes do not have to be implemented for DI.
Diffstat (limited to 'component')
-rw-r--r-- | component/src/main/java/com/yahoo/component/AbstractComponent.java | 4 | ||||
-rw-r--r-- | component/src/main/java/com/yahoo/component/Component.java | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/component/src/main/java/com/yahoo/component/AbstractComponent.java b/component/src/main/java/com/yahoo/component/AbstractComponent.java index fb093c7e24c..7fc828becb5 100644 --- a/component/src/main/java/com/yahoo/component/AbstractComponent.java +++ b/component/src/main/java/com/yahoo/component/AbstractComponent.java @@ -6,8 +6,8 @@ import com.yahoo.collections.MethodCache; import java.lang.reflect.Method; /** - * Superclass of components. You must use this instead of subclassing Component if your component - * needs to be called on destruction. + * Superclass of destructible components. Container components to be created via dependency injection + * do not have to extend this class unless they need to implement {@link #deconstruct}. * * @author bratseth */ diff --git a/component/src/main/java/com/yahoo/component/Component.java b/component/src/main/java/com/yahoo/component/Component.java index 9740ef9d490..c34044e279a 100644 --- a/component/src/main/java/com/yahoo/component/Component.java +++ b/component/src/main/java/com/yahoo/component/Component.java @@ -3,9 +3,10 @@ package com.yahoo.component; /** - * A named, versioned, identifiable component. - * Components can by default be ordered by their id order. Their identity is defined by the id. - * Prefer extending AbstractComponent instead of implementing this interface directly. + * <p>A named, versioned, identifiable component. + * Components can by default be ordered by their id order. Their identity is defined by the id.</p> + * + * <p>Container components to be created via dependency injection do not need to implement this interface.</p> * * @author bratseth */ |