Class BeanRepository
java.lang.Object
org.apache.jasper.compiler.BeanRepository
Repository of {page, request, session, application}-scoped beans
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBean(Node.UseBean n, String s, String type, String scope) Registers a scoped bean.booleancheckVariable(String bean) Checks if a bean with the given name is registered.Class<?> getBeanType(String bean) Returns the class of a registered bean.
-
Constructor Details
-
BeanRepository
Constructor.- Parameters:
loader- The class loadererr- The error dispatcher that will be used to report errors
-
-
Method Details
-
addBean
Registers a scoped bean.- Parameters:
n- the UseBean nodes- the bean nametype- the bean typescope- the bean scope- Throws:
JasperException- if the scope is invalid
-
getBeanType
Returns the class of a registered bean.- Parameters:
bean- the bean name- Returns:
- the bean class
- Throws:
JasperException- if the class cannot be loaded
-
checkVariable
Checks if a bean with the given name is registered.- Parameters:
bean- the bean name- Returns:
- true if the bean is registered
-