Home » apache-openwebbeans-1.0.0-incubating-M3-sources » org.apache.webbeans.portable.creation » [javadoc | source]

    1   /*
    2    * Licensed to the Apache Software Foundation (ASF) under one or more
    3    * contributor license agreements. See the NOTICE file distributed with this
    4    * work for additional information regarding copyright ownership. The ASF
    5    * licenses this file to You under the Apache License, Version 2.0 (the
    6    * "License"); you may not use this file except in compliance with the License.
    7    * You may obtain a copy of the License at
    8    * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
    9    * or agreed to in writing, software distributed under the License is
   10    * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   11    * KIND, either express or implied. See the License for the specific language
   12    * governing permissions and limitations under the License.
   13    */
   14   package org.apache.webbeans.portable.creation;
   15   
   16   import org.apache.webbeans.component.AbstractProducerBean;
   17   
   18   /**
   19    * Implementation for producer beans.
   20    * 
   21    * @version $Rev: 791166 $ $Date: 2009-07-04 22:00:12 +0300 (Sat, 04 Jul 2009) $
   22    *
   23    * @param <T> producer return type info
   24    */
   25   public class ProducerBeansProducer<T> extends AbstractProducer<T>
   26   {
   27       /**
   28        * Creats a new producer bean producer.
   29        * 
   30        * @param bean producer bean
   31        */
   32       public ProducerBeansProducer(AbstractProducerBean<T> bean)
   33       {
   34           super(bean);
   35       }
   36       
   37       /**
   38        * {@inheritDoc}
   39        */
   40       @Override
   41       @SuppressWarnings("unchecked")
   42       public void dispose(T instance)
   43       {
   44           AbstractProducer<T> producer = getBean(AbstractProducer.class);
   45           producer.dispose(instance);
   46       }
   47       
   48   }

Home » apache-openwebbeans-1.0.0-incubating-M3-sources » org.apache.webbeans.portable.creation » [javadoc | source]