KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > beehive > wsm > databinding > GenericHolder


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

20 package org.apache.beehive.wsm.databinding;
21
22
23 import java.lang.reflect.Field JavaDoc;
24
25 import javax.xml.rpc.holders.Holder JavaDoc;
26
27 /*******************************************************************************
28  *
29  *
30  * @author Jonathan Colwell
31  */

32 public class GenericHolder<T> implements Holder JavaDoc {
33     
34     public T value;
35     
36     public GenericHolder(T value) {
37         this.value = value;
38     }
39
40     // The blank constructore is made private so that the value is always set in the holder. The type of the value
41
// is used by the service control to determine the type of class conversion it would need to stuff value to the
42
// holder from the soap message result. The only way I have been able to get the type of the Value is by
43
// looking at its class, which requires that for the value class to have been instantiated.
44
private GenericHolder() {}
45     
46     
47
48
49 }
50
Popular Tags