Package org.apache.jasper.compiler
Class BeanRepository
- java.lang.Object
-
- org.apache.jasper.compiler.BeanRepository
-
public class BeanRepository extends java.lang.ObjectRepository of {page, request, session, application}-scoped beans
-
-
Constructor Summary
Constructors Constructor Description BeanRepository(java.lang.ClassLoader loader, ErrorDispatcher err)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddBean(Node.UseBean n, java.lang.String s, java.lang.String type, java.lang.String scope)Registers a scoped bean.booleancheckVariable(java.lang.String bean)Checks if a bean with the given name is registered.java.lang.Class<?>getBeanType(java.lang.String bean)Returns the class of a registered bean.
-
-
-
Constructor Detail
-
BeanRepository
public BeanRepository(java.lang.ClassLoader loader, ErrorDispatcher err)Constructor.- Parameters:
loader- The class loadererr- The error dispatcher that will be used to report errors
-
-
Method Detail
-
addBean
public void addBean(Node.UseBean n, java.lang.String s, java.lang.String type, java.lang.String scope) throws JasperException
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
public java.lang.Class<?> getBeanType(java.lang.String bean) throws JasperExceptionReturns the class of a registered bean.- Parameters:
bean- the bean name- Returns:
- the bean class
- Throws:
JasperException- if the class cannot be loaded
-
checkVariable
public boolean checkVariable(java.lang.String bean)
Checks if a bean with the given name is registered.- Parameters:
bean- the bean name- Returns:
- true if the bean is registered
-
-