Class ServletContextBeanArchiveHandler
- java.lang.Object
-
- org.jboss.weld.environment.servlet.deployment.ServletContextBeanArchiveHandler
-
- All Implemented Interfaces:
BeanArchiveHandler
- Direct Known Subclasses:
JandexServletContextBeanArchiveHandler
public class ServletContextBeanArchiveHandler extends Object implements BeanArchiveHandler
Handles the paths to resources within a web application if a WAR archive is not extracted to the file system.For
WEB-INF/classes,ServletContext.getResourcePaths(String)is used. For libraries, onlywarprotocol is supported.- Author:
- Martin Kouba, Thomas Meyer
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringDOTprotected javax.servlet.ServletContextservletContextprotected static StringSLASH
-
Constructor Summary
Constructors Constructor Description ServletContextBeanArchiveHandler(javax.servlet.ServletContext servletContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidadd(String rootPath, String subpath, BeanArchiveBuilder builder)BeanArchiveBuilderhandle(String path)The returned builder must only contain a complete set of found classes, other properties do not have to be set.
-
-
-
Field Detail
-
SLASH
protected static final String SLASH
- See Also:
- Constant Field Values
-
DOT
protected static final String DOT
- See Also:
- Constant Field Values
-
servletContext
protected final javax.servlet.ServletContext servletContext
-
-
Method Detail
-
handle
public BeanArchiveBuilder handle(String path)
Description copied from interface:BeanArchiveHandlerThe returned builder must only contain a complete set of found classes, other properties do not have to be set.- Specified by:
handlein interfaceBeanArchiveHandler- Parameters:
path- A reference to a bean archive (e.g. file path)- Returns:
- the BeanArchiveBuilder or
nullif the reference cannot be handled
-
add
protected void add(String rootPath, String subpath, BeanArchiveBuilder builder)
-
-