KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > java > plugin > tools > mocks > MockDocumentation


1 /*****************************************************************************
2  * Java Plug-in Framework (JPF)
3  * Copyright (C) 2006 Dmitry Olshansky
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *****************************************************************************/

19 package org.java.plugin.tools.mocks;
20
21 import java.util.Collection JavaDoc;
22 import java.util.Collections JavaDoc;
23 import java.util.LinkedList JavaDoc;
24
25 import org.java.plugin.registry.Documentation;
26 import org.java.plugin.registry.Identity;
27
28 /**
29  * @version $Id: MockDocumentation.java,v 1.2 2006/09/14 18:10:39 ddimon Exp $
30  */

31 public class MockDocumentation implements Documentation {
32     private String JavaDoc caption;
33     private Identity declaringIdentity;
34     private String JavaDoc text;
35     private LinkedList JavaDoc references = new LinkedList JavaDoc();
36
37     /**
38      * @see org.java.plugin.registry.Documentation#getCaption()
39      */

40     public String JavaDoc getCaption() {
41         return caption;
42     }
43     
44     /**
45      * @param value the caption to set
46      * @return this instance
47      */

48     public MockDocumentation setCaption(final String JavaDoc value) {
49         caption = value;
50         return this;
51     }
52
53     /**
54      * @see org.java.plugin.registry.Documentation#getDeclaringIdentity()
55      */

56     public Identity getDeclaringIdentity() {
57         return declaringIdentity;
58     }
59     
60     /**
61      * @param value the declaring identity to set
62      * @return this instance
63      */

64     public MockDocumentation setDeclaringIdentity(final Identity value) {
65         declaringIdentity = value;
66         return this;
67     }
68
69     /**
70      * @see org.java.plugin.registry.Documentation#getReferences()
71      */

72     public Collection JavaDoc getReferences() {
73         return Collections.unmodifiableCollection(references);
74     }
75     
76     /**
77      * @param reference reference to add
78      * @return this instance
79      */

80     public MockDocumentation addReference(final String JavaDoc reference) {
81         references.add(reference);
82         return this;
83     }
84
85     /**
86      * @see org.java.plugin.registry.Documentation#getText()
87      */

88     public String JavaDoc getText() {
89         return text;
90     }
91
92     /**
93      * @param value the text to set
94      * @return this instance
95      */

96     public MockDocumentation setText(final String JavaDoc value) {
97         text = value;
98         return this;
99     }
100 }
101
Popular Tags