Home » apache-openwebbeans-1.0.0-incubating-M3-sources » org.apache.webbeans.spi.deployer » [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
    4    *  this work for additional information regarding copyright ownership.
    5    *  The ASF licenses this file to You under the Apache License, Version 2.0
    6    *  (the "License"); you may not use this file except in compliance with
    7    *  the License.  You may obtain a copy of the License at
    8    * 
    9    *       http://www.apache.org/licenses/LICENSE-2.0
   10    * 
   11    *  Unless required by applicable law or agreed to in writing, software
   12    *  distributed under the License is distributed on an "AS IS" BASIS,
   13    *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   14    *  See the License for the specific language governing permissions and
   15    *  limitations under the License.
   16    */
   17   package org.apache.webbeans.spi.deployer;
   18   
   19   import java.net.URL;
   20   import java.util.Map;
   21   import java.util.Set;
   22   
   23   import org.apache.webbeans.exception.WebBeansDeploymentException;
   24   
   25   /**
   26    * This SPI is for abstracting the class scanning.  
   27    *
   28    * In a production environment Many different modules need to perform 
   29    * class scanning (EJB, JSF, JPA, ...). This SPI allows us to only have one 
   30    * central class scanner for the whole application server
   31    * which only performs the scanning once at startup of each WebApp.
   32    * 
   33    * @version $Rev: 786231 $ $Date: 2009-06-18 22:53:01 +0300 (Thu, 18 Jun 2009) $
   34    */
   35   public interface MetaDataDiscoveryService
   36   {
   37       /**
   38        * initialise the class scanner
   39        * @param object
   40        */
   41       public void init(Object object);
   42   
   43       /**
   44        * Perform the actual class scanning.
   45        * @throws WebBeansDeploymentException
   46        */
   47       public void scan() throws WebBeansDeploymentException;
   48       
   49       /**
   50        * @return the locations of the beans.xml files. 
   51        */
   52       public Set<URL> getWebBeansXmlLocations();
   53       
   54       /**
   55        * Get all scanned classes and all annotations used by each very class.
   56        * @return key is the list of scanned classes, Set is a list of annotations used by that class.
   57        */
   58       Map<String, Set<String>> getClassIndex();
   59   
   60       /**
   61        * Get all used annotations with all classes which usess this annotation somehow.   
   62        * @return key is the fully qualified string name of a annotation class, Set is a 
   63        * list of classes that use that annotation somehow.
   64        */
   65       Map<String, Set<String>> getAnnotationIndex();
   66       
   67   }

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