01: /*
02: * Copyright 2004,2004 The Apache Software Foundation.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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:
17: package org.apache.bsf.util;
18:
19: /**
20: * A <em>Bean</em> is the class used to represent a bean: it holds a
21: * type and a value. This is needed because otherwise we can't represent
22: * the types of null-valued beans (or primitives) correctly. This was
23: * originally in the BML player.
24: *
25: * @author Sanjiva Weerawarana
26: */
27: public class Bean {
28: // type of this bean
29: public Class type;
30:
31: // its current value (mebbe null)
32: public Object value;
33:
34: public Bean(Class type, Object value) {
35: this.type = type;
36: this.value = value;
37: }
38: }
|