BeanRepositorypublic class BeanRepository extends Object Repository of {page, request, session, application}-scoped beans |
Fields Summary |
---|
protected HashMap | beanTypes | protected ClassLoader | loader | protected ErrorDispatcher | errDispatcher |
Constructors Summary |
---|
public BeanRepository(ClassLoader loader, ErrorDispatcher err)Constructor.
this.loader = loader;
this.errDispatcher = err;
beanTypes = new HashMap<String, String>();
|
Methods Summary |
---|
public void | addBean(Node.UseBean n, java.lang.String s, java.lang.String type, java.lang.String scope)
if (!(scope == null || scope.equals("page") || scope.equals("request")
|| scope.equals("session") || scope.equals("application"))) {
errDispatcher.jspError(n, "jsp.error.usebean.badScope");
}
beanTypes.put(s, type);
| public boolean | checkVariable(java.lang.String bean)
return beanTypes.containsKey(bean);
| public java.lang.Class | getBeanType(java.lang.String bean)
Class clazz = null;
try {
clazz = loader.loadClass(beanTypes.get(bean));
} catch (ClassNotFoundException ex) {
throw new JasperException (ex);
}
return clazz;
|
|