[jboss-cvs] JBossAS SVN: r90092 - in projects/kernel/trunk/kernel/src/main/java/org/jboss/beans/metadata: spi and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Jun 11 10:32:48 EDT 2009
Author: kabir.khan at jboss.com
Date: 2009-06-11 10:32:48 -0400 (Thu, 11 Jun 2009)
New Revision: 90092
Modified:
projects/kernel/trunk/kernel/src/main/java/org/jboss/beans/metadata/api/annotations/Demand.java
projects/kernel/trunk/kernel/src/main/java/org/jboss/beans/metadata/api/annotations/StringValue.java
projects/kernel/trunk/kernel/src/main/java/org/jboss/beans/metadata/spi/DemandMetaData.java
projects/kernel/trunk/kernel/src/main/java/org/jboss/beans/metadata/spi/InstallMetaData.java
projects/kernel/trunk/kernel/src/main/java/org/jboss/beans/metadata/spi/builder/BeanMetaDataBuilder.java
Log:
[JBKERNEL-14] Better comments regarding states
Modified: projects/kernel/trunk/kernel/src/main/java/org/jboss/beans/metadata/api/annotations/Demand.java
===================================================================
--- projects/kernel/trunk/kernel/src/main/java/org/jboss/beans/metadata/api/annotations/Demand.java 2009-06-11 14:31:19 UTC (rev 90091)
+++ projects/kernel/trunk/kernel/src/main/java/org/jboss/beans/metadata/api/annotations/Demand.java 2009-06-11 14:32:48 UTC (rev 90092)
@@ -26,6 +26,7 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+
/**
* Used to specify a bean's demand.
*
@@ -52,19 +53,21 @@
/**
* Get demand value.
*
- * @return the demand
+ * @return the name of what we are demanding
*/
String value();
/**
- * Get when required.
+ * Get when required. The default is the {@link org.jboss.dependency.spi.ControllerState#INSTANTIATED} state
*
* @return the when required state
*/
String whenRequired() default "Instantiated";
/**
- * Get the transfomer.
+ * Get the transfomer, which is used to determine the {@link org.jboss.kernel.api.dependency.Matcher} to
+ * use via the {@link org.jboss.kernel.api.dependency.MatcherFactory}. The Matcher determines how to match the
+ * names of the available supplies, with the demand value.
*
* @return the transformer
*/
Modified: projects/kernel/trunk/kernel/src/main/java/org/jboss/beans/metadata/api/annotations/StringValue.java
===================================================================
--- projects/kernel/trunk/kernel/src/main/java/org/jboss/beans/metadata/api/annotations/StringValue.java 2009-06-11 14:31:19 UTC (rev 90091)
+++ projects/kernel/trunk/kernel/src/main/java/org/jboss/beans/metadata/api/annotations/StringValue.java 2009-06-11 14:32:48 UTC (rev 90092)
@@ -31,7 +31,7 @@
* with a type to cast it to the correct type.
*
* <pre>
- * void setInteger(@StringValue(value="123", type="int") int i){}
+ * void setInteger(@StringValue(value="123", type=Integer.TYPE) int i){}
* </pre>
* causes the parameter <code>i</code> to be called with the int <code>123</code>.
*
Modified: projects/kernel/trunk/kernel/src/main/java/org/jboss/beans/metadata/spi/DemandMetaData.java
===================================================================
--- projects/kernel/trunk/kernel/src/main/java/org/jboss/beans/metadata/spi/DemandMetaData.java 2009-06-11 14:31:19 UTC (rev 90091)
+++ projects/kernel/trunk/kernel/src/main/java/org/jboss/beans/metadata/spi/DemandMetaData.java 2009-06-11 14:32:48 UTC (rev 90092)
@@ -43,14 +43,14 @@
Object getDemand();
/**
- * Get when the dependency is required
+ * Get when the dependency is required. The default is {@link ControllerState#INSTANTIATED}
*
* @return when the dependency is required
*/
ControllerState getWhenRequired();
/**
- * Get the target state of the demanded bean
+ * Get the target state of the demanded bean. The default is {@link ControllerState#INSTALLED}
*
* @return the target state
*/
Modified: projects/kernel/trunk/kernel/src/main/java/org/jboss/beans/metadata/spi/InstallMetaData.java
===================================================================
--- projects/kernel/trunk/kernel/src/main/java/org/jboss/beans/metadata/spi/InstallMetaData.java 2009-06-11 14:31:19 UTC (rev 90091)
+++ projects/kernel/trunk/kernel/src/main/java/org/jboss/beans/metadata/spi/InstallMetaData.java 2009-06-11 14:32:48 UTC (rev 90092)
@@ -47,7 +47,7 @@
String getBean();
/**
- * Get the required state of bean containing the (un)installation method
+ * Get the required state of bean containing the (un)installation method. The default is {@link ControllerState#INSTALLED}
*
* @return the required state or null if it must be in the registry
*/
Modified: projects/kernel/trunk/kernel/src/main/java/org/jboss/beans/metadata/spi/builder/BeanMetaDataBuilder.java
===================================================================
--- projects/kernel/trunk/kernel/src/main/java/org/jboss/beans/metadata/spi/builder/BeanMetaDataBuilder.java 2009-06-11 14:31:19 UTC (rev 90091)
+++ projects/kernel/trunk/kernel/src/main/java/org/jboss/beans/metadata/spi/builder/BeanMetaDataBuilder.java 2009-06-11 14:32:48 UTC (rev 90092)
@@ -1896,7 +1896,9 @@
public abstract ValueMetaData createString(String type, String value);
/**
- * Create an injection using a bean as what is being injected
+ * Create an injection using a bean as what is being injected, using the default
+ * whenRequired state of {@link ControllerState#CONFIGURED} and the default dependentState of
+ * {@link ControllerState#INSTANTIATED}
*
* @param bean the name of bean to inject
* @return the injection
@@ -1907,7 +1909,9 @@
}
/**
- * Create an injection being able to specify the the property of a bean as what is being injected
+ * Create an injection being able to specify the the property of a bean as what is being injected, using the default
+ * whenRequired state of {@link ControllerState#CONFIGURED} and the default dependentState of
+ * {@link ControllerState#INSTANTIATED}
*
* @param bean the name of the bean
* @param property the name of the property of the bean to inject. If null, the bean itself will be injected
@@ -1923,8 +1927,8 @@
*
* @param bean the name of the bean
* @param property the name of the property of the bean to inject. If null, the bean itself will be injected
- * @param whenRequired when the injection is required
- * @param dependentState the required state of the injected bean
+ * @param whenRequired when the injection is required. If null {@link ControllerState#CONFIGURED} is used.
+ * @param dependentState the required state of the injected bean. If null {@link ControllerState#INSTALLED} is used.
* @return the injection
*/
public ValueMetaData createInject(Object bean, String property, ControllerState whenRequired, ControllerState dependentState)
@@ -1937,8 +1941,8 @@
*
* @param bean the name of the bean
* @param property the name of the property of the bean to inject. If null, the bean itself will be injected
- * @param whenRequired when the injection is required
- * @param dependentState the required state of the injected bean
+ * @param whenRequired when the injection is required. If null {@link ControllerState#CONFIGURED} is used.
+ * @param dependentState the required state of the injected bean. If null {@link ControllerState#INSTALLED} is used.
* @param search the search info describing how to search for the injected bean if we have a hierarchy of
* {@link org.jboss.dependency.spi.Controller}s
* @return the injection
@@ -1946,7 +1950,9 @@
public abstract ValueMetaData createInject(Object bean, String property, ControllerState whenRequired, ControllerState dependentState, SearchInfo search);
/**
- * Create contextual injection. This does not need to specify the name of the bean,
+ * Create contextual injection, using the default
+ * whenRequired state of {@link ControllerState#CONFIGURED} and the default dependentState of
+ * {@link ControllerState#INSTANTIATED}. This does not need to specify the name of the bean,
* but looks at the target property/parameter type for autowiring
*
* @see BeanMetaData#isAutowireCandidate()
@@ -1962,8 +1968,8 @@
* but looks at the target property/parameter type for autowiring
*
* @see BeanMetaData#isAutowireCandidate()
- * @param whenRequired when the injection is required
- * @param dependentState the state of the injected bean
+ * @param whenRequired when the injection is required. If null {@link ControllerState#CONFIGURED} is used.
+ * @param dependentState the required state of the injected bean. If null {@link ControllerState#INSTALLED} is used.
* @return the contextual injection
*/
public ValueMetaData createContextualInject(ControllerState whenRequired, ControllerState dependentState)
@@ -1977,8 +1983,8 @@
*
* @see BeanMetaData#isAutowireCandidate()
* @see BeanMetaData#getAutowireType()
- * @param whenRequired when the injection is required
- * @param dependentState the state of the injected bean
+ * @param whenRequired when the injection is required. If null {@link ControllerState#CONFIGURED} is used.
+ * @param dependentState the required state of the injected bean. If null {@link ControllerState#INSTALLED} is used.
* @param autowire the autowire type. If null, the type is {@link AutowireType#BY_CLASS}
* @param option the inject option
* @return the contextual injection
@@ -1992,8 +1998,8 @@
* Create contextual injection. This does not need to specify the name of the bean,
* but looks at the target property/parameter type for autowiring
*
- * @param whenRequired when the injection is required
- * @param dependentState the state of the injected bean
+ * @param whenRequired when the injection is required. If null {@link ControllerState#CONFIGURED} is used.
+ * @param dependentState the required state of the injected bean. If null {@link ControllerState#INSTALLED} is used.
* @param autowire the autowire type
* @param option the inject option
* @param search the search info describing how to search for the injected bean if we have a hierarchy of
@@ -2003,7 +2009,9 @@
public abstract ValueMetaData createContextualInject(ControllerState whenRequired, ControllerState dependentState, AutowireType autowire, InjectOption option, SearchInfo search);
/**
- * Inject values from the context of the bean we are creating
+ * Inject values from the context of the bean we are creating, using the default
+ * whenRequired state of {@link ControllerState#CONFIGURED} and the default dependentState of
+ * {@link ControllerState#INSTANTIATED}.
*
* @param fromContext enum specifying what to inject from the {@link org.jboss.kernel.spi.dependency.KernelControllerContext}
* @return the from context injection
@@ -2014,7 +2022,9 @@
}
/**
- * Inject values from the context of another bean
+ * Inject values from the context of another bean, using the default
+ * whenRequired state of {@link ControllerState#CONFIGURED} and the default dependentState of
+ * {@link ControllerState#INSTANTIATED}.
*
* @param fromContext enum specifying what to inject from the {@link org.jboss.kernel.spi.dependency.KernelControllerContext}
* @param contextName the context name
@@ -2026,11 +2036,12 @@
}
/**
- * Inject values from the context of another bean
+ * Inject values from the context of another bean, using the default
+ * whenRequired state of {@link ControllerState#CONFIGURED}
*
* @param fromContext enum specifying what to inject from the {@link org.jboss.kernel.spi.dependency.KernelControllerContext}
* @param contextName the context name
- * @param dependentState the state of the injected/other context
+ * @param dependentState the state of the injected/other context. If null {@link ControllerState#INSTANTIATED} is used.
* @return the from context injection
*/
public ValueMetaData createFromContextInject(FromContext fromContext, Object contextName, ControllerState dependentState)
@@ -2043,7 +2054,7 @@
*
* @param fromContext enum specifying what to inject from the {@link org.jboss.kernel.spi.dependency.KernelControllerContext}
* @param contextName the context name
- * @param dependentState the state of the injected/other context
+ * @param dependentState the state of the injected/other context. If null {@link ControllerState#INSTANTIATED} is used.
* @param search the search info describing how to search for the injected bean if we have a hierarchy of
* {@link org.jboss.dependency.spi.Controller}s
* @return the from context injection
More information about the jboss-cvs-commits
mailing list