KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > avalon > excalibur > container > Locator


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.excalibur.container;
9
10 import java.net.URL JavaDoc;
11
12 /**
13  * This contains information required to locate a component.
14  *
15  * @author <a HREF="mailto:peter@apache.org">Peter Donald</a>
16  */

17 public class Locator
18 {
19     private final String JavaDoc m_name;
20     private final URL JavaDoc m_location;
21
22     public Locator( final String JavaDoc name, final URL JavaDoc location )
23     {
24         m_name = name;
25         m_location = location;
26     }
27
28     /**
29      * Retrieve "name" of component type.
30      * The "name" usually indicates the classname.
31      *
32      * @return the name
33      */

34     public String JavaDoc getName()
35     {
36         return m_name;
37     }
38
39     /**
40      * Retrieve location of component.
41      * Usually references the archive (zip/jar/war/ear)
42      * which contains the name (ie classname).
43      * May be null.
44      *
45      * @return the URL of location
46      */

47     public URL JavaDoc getLocation()
48     {
49         return m_location;
50     }
51 }
52
Popular Tags