You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by do...@apache.org on 2002/09/13 17:43:17 UTC
cvs commit: jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/verifier MetaDataVerifier.java
donaldp 2002/09/13 08:43:17
Modified: containerkit/src/java/org/apache/excalibur/containerkit/verifier
MetaDataVerifier.java
Log:
References on Profile changed to MetaData
Revision Changes Path
1.18 +26 -29 jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/verifier/MetaDataVerifier.java
Index: MetaDataVerifier.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/verifier/MetaDataVerifier.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- MetaDataVerifier.java 9 Sep 2002 11:35:53 -0000 1.17
+++ MetaDataVerifier.java 13 Sep 2002 15:43:17 -0000 1.18
@@ -20,7 +20,6 @@
import org.apache.avalon.framework.tools.verifier.VerifyException;
import org.apache.avalon.framework.tools.verifier.ComponentVerifier;
import org.apache.excalibur.containerkit.metadata.ComponentMetaData;
-import org.apache.excalibur.containerkit.registry.ComponentProfile;
/**
* This Class verifies that an implementation is valid wrt the
@@ -32,7 +31,7 @@
* <li>Verify that the Class objects for Component implement the
* service interfaces.</li>
* <li>Verify that the Class is a valid Avalon Component as per the
- * rules in {@link org.apache.avalon.framework.tools.verifier.ComponentVerifier} object.</li>
+ * rules in {@link ComponentVerifier} object.</li>
* <li>Verify that the Class is Composable/Serviceable if and only if
* dependencies are declared.</li>
* <li>Verify that the Class is Contextualizable if and context
@@ -83,31 +82,32 @@
* Verfiy that specified components designate classes that implement the
* advertised interfaces. And confrorm to expectations of {@link ComponentMetaData}.
*
- * @param component the {@link ComponentProfile} object for the components
+ * @param metaData the {@link ComponentMetaData} object for the components
* @param classLoader the ClassLoader to load component from
- * @throws org.apache.avalon.framework.tools.verifier.VerifyException if an error occurs
+ * @throws VerifyException if an error occurs
*/
- public void verifyType( final ComponentProfile component,
+ public void verifyType( final ComponentMetaData metaData,
+ final ComponentInfo info,
final ClassLoader classLoader )
throws VerifyException
{
- final Class clazz = getClass( classLoader, component );
- verifyType( component, clazz );
+ final Class clazz = getClass( classLoader, metaData );
+ verifyType( metaData, info, clazz );
}
/**
* Verfiy that specified components designate classes that implement the
- * advertised interfaces. And confrorm to expectations of {@link ComponentProfile}.
+ * advertised interfaces. And confrorm to expectations of {@link ComponentMetaData}.
*
- * @param component the {@link ComponentProfile} object for the components
- * @throws org.apache.avalon.framework.tools.verifier.VerifyException if an error occurs
+ * @param component the {@link ComponentMetaData} object for the components
+ * @throws VerifyException if an error occurs
*/
- public void verifyType( final ComponentProfile component,
+ public void verifyType( final ComponentMetaData component,
+ final ComponentInfo info,
final Class clazz )
throws VerifyException
{
- final String name = component.getMetaData().getName();
- final ComponentInfo info = component.getInfo();
+ final String name = component.getName();
final Class[] interfaces =
getServiceClasses( name,
info.getServices(),
@@ -123,11 +123,11 @@
* Verify that the if the component is not Contextualizable that it
* does not declare Context Entrys.
*
- * @param component the {@link ComponentProfile}
+ * @param metaData the {@link ComponentMetaData}
* @param clazz the class implementing component
- * @throws org.apache.avalon.framework.tools.verifier.VerifyException if fails verification check
+ * @throws VerifyException if fails verification check
*/
- protected void verifyContextPresence( final ComponentProfile component,
+ protected void verifyContextPresence( final ComponentMetaData metaData,
final ComponentInfo info,
final Class clazz )
throws VerifyException
@@ -139,7 +139,6 @@
{
if( 0 != count )
{
- final ComponentMetaData metaData = component.getMetaData();
final String message =
REZ.getString( "metadata.declare-uneeded-entrys.error",
metaData.getName(),
@@ -156,15 +155,14 @@
* <p>or</p>
* <p>Is Composable/Serviceable and does declare dependencys</p>
*
- * @param component the {@link ComponentProfile}
+ * @param metaData the {@link ComponentMetaData}
* @param clazz the class implementing component
- * @throws org.apache.avalon.framework.tools.verifier.VerifyException if fails verification check
+ * @throws VerifyException if fails verification check
*/
- protected void verifyDependencyPresence( final ComponentProfile component,
+ protected void verifyDependencyPresence( final ComponentMetaData metaData,
final Class clazz )
throws VerifyException
{
- final ComponentMetaData metaData = component.getMetaData();
final int count = metaData.getDependencies().length;
final boolean aquiresServices =
Composable.class.isAssignableFrom( clazz ) ||
@@ -191,7 +189,7 @@
* @param services the services the component offers
* @param classLoader the classLoader
* @return an array of Classes for all the services
- * @throws org.apache.avalon.framework.tools.verifier.VerifyException if an error occurs
+ * @throws VerifyException if an error occurs
*/
protected Class[] getServiceClasses( final String name,
final ServiceDescriptor[] services,
@@ -221,19 +219,18 @@
}
/**
- * Load class object for specified {@link ComponentProfile}.
+ * Load class object for specified {@link ComponentMetaData}.
*
* @param classLoader the ClassLoader to use
* @param component the meta data associate with component
* @return the Class object
- * @throws org.apache.avalon.framework.tools.verifier.VerifyException if unable to aquire class object
+ * @throws VerifyException if unable to aquire class object
*/
private Class getClass( final ClassLoader classLoader,
- final ComponentProfile component )
+ final ComponentMetaData component )
throws VerifyException
{
- final ComponentMetaData metaData = component.getMetaData();
- final String classname = metaData.getImplementationKey();
+ final String classname = component.getImplementationKey();
Class clazz = null;
try
{
@@ -243,7 +240,7 @@
{
final String message =
REZ.getString( "assembly.bad-class.error",
- metaData.getName(),
+ component.getName(),
classname,
e.toString() );
throw new VerifyException( message );
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>