KickJava   Java API By Example, From Geeks To Geeks.

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


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 import org.apache.avalon.framework.Version;
11
12 /**
13  *
14  * @author <a HREF="mailto:peter at apache.org">Peter Donald</a>
15  */

16 public class BlockDescriptor
17 {
18     /**
19      * The short name of the Block. Useful for displaying
20      * human readable strings describing the type in
21      * assembly tools or generators.
22      */

23     private final String JavaDoc m_name;
24     private final String JavaDoc m_implementationKey;
25     private final Version m_version;
26     private final String JavaDoc m_schemaType;
27
28     public BlockDescriptor( final String JavaDoc name,
29                             final String JavaDoc implementationKey,
30                             final String JavaDoc schemaType,
31                             final Version version )
32     {
33         m_name = name;
34         m_implementationKey = implementationKey;
35         m_version = version;
36         m_schemaType = schemaType;
37     }
38
39     /**
40      * Retrieve the name of Block type.
41      *
42      * @return the name of Block type.
43      */

44     public String JavaDoc getName()
45     {
46         return m_name;
47     }
48
49     /**
50      * Retrieve the Class Name of Block.
51      *
52      * @return the Class Name of block
53      * @see #getImplementationKey
54      * @deprecated Deprecated and replaced by {@link #getImplementationKey}
55      */

56     public String JavaDoc getClassname()
57     {
58         return getImplementationKey();
59     }
60
61     /**
62      * Retrieve the implementation key for the Block.
63      * Usually the keys is a classname.
64      *
65      * @return the implementation key for the Block
66      */

67     public String JavaDoc getImplementationKey()
68     {
69         return m_implementationKey;
70     }
71
72     /**
73      * Retrieve Version of current Block.
74      *
75      * @return the version of block
76      */

77     public Version getVersion()
78     {
79         return m_version;
80     }
81
82     /**
83      * Retrieve the Schema Type of Block
84      *
85      * @return the Schema Type of block
86      */

87     public String JavaDoc getSchemaType()
88     {
89         return m_schemaType;
90     }
91 }
92
93
Popular Tags