View Javadoc

1   /*
2    * $Id: BeanProviderImpl.java 1103095 2011-05-14 13:18:29Z simonetripodi $
3    * Licensed to the Apache Software Foundation (ASF) under one
4    * or more contributor license agreements.  See the NOTICE file
5    * distributed with this work for additional information
6    * regarding copyright ownership.  The ASF licenses this file
7    * to you under the Apache License, Version 2.0 (the
8    * "License"); you may not use this file except in compliance
9    * with the License.  You may obtain a copy of the License at
10   *
11   * http://www.apache.org/licenses/LICENSE-2.0
12   *
13   * Unless required by applicable law or agreed to in writing,
14   * software distributed under the License is distributed on an
15   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16   * KIND, either express or implied.  See the License for the
17   * specific language governing permissions and limitations
18   * under the License.
19   */
20  /**
21   * 
22   */
23  package org.apache.commons.ognl.test.objects;
24  
25  import java.io.Serializable;
26  import java.util.HashMap;
27  import java.util.Map;
28  
29  /**
30   * Implementation of {@link BeanProvider}.
31   */
32  public class BeanProviderImpl
33      implements Serializable, BeanProvider
34  {
35      private Map _map = new HashMap();
36  
37      public BeanProviderImpl()
38      {
39      }
40  
41      public Object getBean( String name )
42      {
43          return _map.get( name );
44      }
45  
46      public void setBean( String name, Object bean )
47      {
48          _map.put( name, bean );
49      }
50  }