类 MockFilterConfig
java.lang.Object
cn.taketoday.mock.web.MockFilterConfig
- 所有已实现的接口:
jakarta.servlet.FilterConfig
Mock implementation of the
FilterConfig interface.
Used for testing the web framework; also useful for testing
custom Filter implementations.
- 从以下版本开始:
- 4.0
- 作者:
- Juergen Hoeller
- 另请参阅:
-
字段概要
字段 -
构造器概要
构造器构造器说明Create a new MockFilterConfig with a defaultMockServletContext.MockFilterConfig(jakarta.servlet.ServletContext servletContext) Create a new MockFilterConfig.MockFilterConfig(jakarta.servlet.ServletContext servletContext, String filterName) Create a new MockFilterConfig.MockFilterConfig(String filterName) Create a new MockFilterConfig with a defaultMockServletContext. -
方法概要
修饰符和类型方法说明voidaddInitParameter(String name, String value) getInitParameter(String name) jakarta.servlet.ServletContext
-
字段详细资料
-
servletContext
private final jakarta.servlet.ServletContext servletContext -
filterName
-
initParameters
-
-
构造器详细资料
-
MockFilterConfig
public MockFilterConfig()Create a new MockFilterConfig with a defaultMockServletContext. -
MockFilterConfig
Create a new MockFilterConfig with a defaultMockServletContext.- 参数:
filterName- the name of the filter
-
MockFilterConfig
public MockFilterConfig(@Nullable jakarta.servlet.ServletContext servletContext) Create a new MockFilterConfig.- 参数:
servletContext- the ServletContext that the servlet runs in
-
MockFilterConfig
Create a new MockFilterConfig.- 参数:
servletContext- the ServletContext that the servlet runs infilterName- the name of the filter
-
-
方法详细资料
-
getFilterName
- 指定者:
getFilterName在接口中jakarta.servlet.FilterConfig
-
getServletContext
public jakarta.servlet.ServletContext getServletContext()- 指定者:
getServletContext在接口中jakarta.servlet.FilterConfig
-
addInitParameter
-
getInitParameter
- 指定者:
getInitParameter在接口中jakarta.servlet.FilterConfig
-
getInitParameterNames
- 指定者:
getInitParameterNames在接口中jakarta.servlet.FilterConfig
-