public abstract class AbstractMetaDataDiscovery extends Object implements BdaScannerService
| Modifier and Type | Field and Description |
|---|---|
protected CdiArchive |
archive |
protected BDABeansXmlScanner |
bdaBeansXmlScanner |
protected OwbAnnotationFinder |
finder |
protected boolean |
isBDAScannerEnabled |
protected ClassLoader |
loader |
protected static Logger |
logger |
static String |
META_INF_BEANS_XML |
protected String[] |
scanningExcludes |
protected WebBeansContext |
webBeansContext |
| Constructor and Description |
|---|
AbstractMetaDataDiscovery() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addDeploymentUrl(String beansXml,
URL cpUrl)
Add an URL for a deployment later on
|
protected void |
addWebBeansXmlLocation(URL beanArchiveUrl)
add the given beans.xml path to the locations list
|
protected abstract void |
configure() |
protected void |
doAddWebBeansXmlLocation(URL beanArchiveUrl) |
protected void |
filterExcludedJars(Set<URL> classPathUrls) |
protected org.apache.xbean.finder.archive.Archive |
getAdditionalArchive() |
BDABeansXmlScanner |
getBDABeansXmlScanner() |
protected Iterable<URL> |
getBeanArchiveUrls()
Deprecated.
just here for backward compat reasons
|
Set<Class<?>> |
getBeanClasses() |
Map<BeanArchiveService.BeanArchiveInformation,Set<Class<?>>> |
getBeanClassesPerBda()
This method only gets called if the initialisation is done already.
|
Map<String,URL> |
getBeanDeploymentUrls() |
Set<URL> |
getBeanXmls() |
void |
init(Object object) |
protected org.apache.xbean.finder.AnnotationFinder |
initFinder() |
void |
initScanningExcludes() |
boolean |
isBDABeansXmlScanningEnabled() |
protected boolean |
isBdaUrlEnabled(URL bdaUrl)
This method could filter out known JARs or even JVM classpaths which
shall not be considered bean archives.
|
protected boolean |
isBeanAnnotatedClass(org.apache.xbean.finder.AnnotationFinder.ClassInfo classInfo)
This method is called for classes from bean archives with
bean-discovery-mode 'annotated'.
|
protected boolean |
isBeanAnnotation(org.apache.xbean.finder.AnnotationFinder.AnnotationInfo annotationInfo) |
protected int |
isExcludedJar(String path) |
protected void |
registerBeanArchives(ClassLoader loader)
Since CDI-1.1 this is actually more a 'findBdaBases' as it also
picks up jars without marker file.
|
void |
release() |
void |
scan()
Configure the Web Beans Container with deployment information and fills
annotation database and beans.xml stream database.
|
protected String |
stripProtocol(String urlPath)
Get rid of any protocol header from the url externalForm
|
protected WebBeansContext |
webBeansContext() |
protected static final Logger logger
public static final String META_INF_BEANS_XML
protected String[] scanningExcludes
protected ClassLoader loader
protected CdiArchive archive
protected OwbAnnotationFinder finder
protected boolean isBDAScannerEnabled
protected BDABeansXmlScanner bdaBeansXmlScanner
protected WebBeansContext webBeansContext
protected org.apache.xbean.finder.AnnotationFinder initFinder()
protected org.apache.xbean.finder.archive.Archive getAdditionalArchive()
protected Iterable<URL> getBeanArchiveUrls()
public Map<String,URL> getBeanDeploymentUrls()
public void scan()
throws WebBeansDeploymentException
scan in interface ScannerServiceWebBeansConfigurationException - if any run time exception occursWebBeansDeploymentExceptionprotected abstract void configure()
protected void registerBeanArchives(ClassLoader loader)
loader - the ClassLoader which should be usedgetBeanArchiveUrls(),
getBeanDeploymentUrls()protected String stripProtocol(String urlPath)
urlPath - protected int isExcludedJar(String path)
public void release()
release in interface ScannerServiceprotected void addDeploymentUrl(String beansXml, URL cpUrl)
beansXml - cpUrl - protected boolean isBdaUrlEnabled(URL bdaUrl)
public void init(Object object)
init in interface ScannerServicepublic void initScanningExcludes()
protected void addWebBeansXmlLocation(URL beanArchiveUrl)
beanArchiveUrl - location pathprotected void doAddWebBeansXmlLocation(URL beanArchiveUrl)
public Map<BeanArchiveService.BeanArchiveInformation,Set<Class<?>>> getBeanClassesPerBda()
getBeanClassesPerBda in interface BdaScannerServicepublic Set<Class<?>> getBeanClasses()
getBeanClasses in interface ScannerServiceprotected boolean isBeanAnnotatedClass(org.apache.xbean.finder.AnnotationFinder.ClassInfo classInfo)
classInfo - protected boolean isBeanAnnotation(org.apache.xbean.finder.AnnotationFinder.AnnotationInfo annotationInfo)
public Set<URL> getBeanXmls()
getBeanXmls in interface ScannerServicepublic BDABeansXmlScanner getBDABeansXmlScanner()
getBDABeansXmlScanner in interface ScannerServicepublic boolean isBDABeansXmlScanningEnabled()
isBDABeansXmlScanningEnabled in interface ScannerServiceprotected WebBeansContext webBeansContext()
Copyright © 2008–2020 The Apache Software Foundation. All rights reserved.