Home » apache-openwebbeans-1.0.0-incubating-M3-sources » org.apache.webbeans.component.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.component.creation;
   15   
   16   import java.util.Set;
   17   
   18   import javax.enterprise.inject.spi.InjectionTarget;
   19   
   20   import org.apache.webbeans.component.InjectionTargetBean;
   21   import org.apache.webbeans.component.ProducerFieldBean;
   22   import org.apache.webbeans.component.ProducerMethodBean;
   23   
   24   /**
   25    * Contract for {@link InjectionTargetBean} creation.
   26    * 
   27    * <p>
   28    * Common operations for ManagedBean.
   29    * </p>
   30    * 
   31    * @version $Rev: 791957 $ $Date: 2009-07-07 22:46:05 +0300 (Tue, 07 Jul 2009) $
   32    *
   33    * @param <T> bean class info
   34    */
   35   public interface InjectedTargetBeanCreator<T> extends InjectionTarget<T>
   36   {
   37       /**
   38        * Defines bean's producer methods.
   39        * 
   40        * @return set of producer methods
   41        */
   42       public Set<ProducerMethodBean<?>> defineProducerMethods();
   43   
   44       /**
   45        * Defines bean's producer fields.
   46        * 
   47        * @return set of producer fields
   48        */
   49       public Set<ProducerFieldBean<?>> defineProducerFields();
   50       
   51       /**
   52        * Defines disposal methods.
   53        */
   54       public void defineDisposalMethods();
   55       
   56       /**
   57        * Define injected fields.
   58        */
   59       public void defineInjectedFields();
   60       
   61       /**
   62        * Define injected methods, a.k.a <code>@Initializer</code>
   63        */
   64       public void defineInjectedMethods();
   65       
   66       /**
   67        * Define observer methods, a.k.a method parameter with <code>@Observes</code>
   68        */
   69       public void defineObserverMethods();    
   70       
   71       /**
   72        * Gets injection target.
   73        * 
   74        * @return injection target
   75        */
   76       public InjectionTarget<T> getInjectedTarget();
   77       
   78       /**
   79        * Sets injection target.
   80        * 
   81        * @param injectionTarget injection target
   82        */
   83       public void setInjectedTarget(InjectionTarget<T> injectionTarget);
   84       
   85       /**
   86        * Returns whether injection target set or not.
   87        * 
   88        * <p>
   89        * If {@link InjectionTarget} instance is set, it is used
   90        * for creating bean instance, calling post construct and pre-destroy
   91        * methods.
   92        * </p>
   93        * 
   94        * @return injection target set or not
   95        */
   96       public boolean isInjectionTargetSet();
   97   }

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