KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > commons > chain > impl > TestContext


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

16 package org.apache.commons.chain.impl;
17
18
19 /**
20  * Subclass of <code>ContextBase</code> to exercize the automatic
21  * delegation to properties of the <code>Context</code> class.
22  */

23
24 public class TestContext extends ContextBase {
25
26
27     // Read-only property
28
private String JavaDoc readOnly = "readOnly";
29     public String JavaDoc getReadOnly() {
30         return (this.readOnly);
31     }
32
33     // Read-write property
34
private String JavaDoc readWrite = "readWrite";
35     public String JavaDoc getReadWrite() {
36         return (this.readWrite);
37     }
38     public void setReadWrite(String JavaDoc readWrite) {
39         this.readWrite = readWrite;
40     }
41
42     // Write-only property
43
private String JavaDoc writeOnly = "writeOnly";
44     public String JavaDoc returnWriteOnly() { // Not a JavaBeans getter
45
return (this.writeOnly);
46     }
47     public void setWriteOnly(String JavaDoc writeOnly) {
48         this.writeOnly = writeOnly;
49     }
50
51
52 }
53
54
Popular Tags