KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > avalon > phoenix > metainfo > DependencyDescriptor


1 /*
2  * Copyright (C) The Apache Software Foundation. All rights reserved.
3  *
4  * This software is published under the terms of the Apache Software License
5  * version 1.1, a copy of which has been included with this distribution in
6  * the LICENSE.txt file.
7  */

8 package org.apache.avalon.phoenix.metainfo;
9
10 /**
11  * A descriptor that describes dependency information for Block.
12  *
13  * @author <a HREF="mailto:peter at apache.org">Peter Donald</a>
14  */

15 public final class DependencyDescriptor
16 {
17     private final String JavaDoc m_role;
18
19     private final ServiceDescriptor m_service;
20
21     /**
22      * Constructor that has all parts as parameters.
23      */

24     public DependencyDescriptor( final String JavaDoc role, final ServiceDescriptor service )
25     {
26         m_role = role;
27         m_service = service;
28     }
29
30     /**
31      * Return role of dependency.
32      *
33      * The role is what is used by block implementor to
34      * aquire dependency in ComponentManager.
35      *
36      * @return the name of the dependency
37      */

38     public String JavaDoc getRole()
39     {
40         return m_role;
41     }
42
43     /**
44      * Return Service dependency provides.
45      *
46      * @return the service dependency provides
47      */

48     public ServiceDescriptor getService()
49     {
50         return m_service;
51     }
52 }
53
Popular Tags