KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > xdoclet > modules > ojb > model > ReferenceDescriptorDef


1 package xdoclet.modules.ojb.model;
2
3 /* Copyright 2004-2005 The Apache Software Foundation
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */

17
18 /**
19  * A reference descriptor for the ojb repository file.
20  *
21  * @author <a HREF="mailto:tomdz@users.sourceforge.net">Thomas Dudziak (tomdz@users.sourceforge.net)</a>
22  * @created April 13, 2003
23  */

24 public class ReferenceDescriptorDef extends FeatureDescriptorDef
25 {
26     /** Whether this is an anonymous reference */
27     private boolean _isAnonymous = false;
28
29     /**
30      * Creates a new reference descriptor object.
31      *
32      * @param name The name of the reference field
33      */

34     public ReferenceDescriptorDef(String JavaDoc name)
35     {
36         super(name);
37     }
38
39     /**
40      * Creates copy of the given reference descriptor object. Note that the copy has no owner initially.
41      *
42      * @param src The original reference
43      * @param prefix A prefix for the name
44      */

45     public ReferenceDescriptorDef(ReferenceDescriptorDef src, String JavaDoc prefix)
46     {
47         super(src, prefix);
48     }
49
50     /**
51      * Declares this reference to be anonymous.
52      */

53     public void setAnonymous()
54     {
55         _isAnonymous = true;
56     }
57     
58     /**
59      * Returns whether this reference is anonymous.
60      *
61      * @return <code>true</code> if it is anonymous
62      */

63     public boolean isAnonymous()
64     {
65         return _isAnonymous;
66     }
67 }
68
Popular Tags