staticModels.clearCache();
@Override protected TemplateModel createModel(Class clazz) throws TemplateModelException { return new StaticModel(clazz, getWrapper()); } }
trueModel = new BooleanModel(Boolean.TRUE, this); staticModels = new StaticModels(this); enumModels = new _EnumModels(this); modelCache = new BeansModelCache(this);
void removeIntrospectionInfo(Class clazz) { synchronized(classCache) { classCache.remove(clazz); staticModels.removeIntrospectionInfo(clazz); if(enumModels != null) { enumModels.removeIntrospectionInfo(clazz); } cachedClassNames.remove(clazz.getName()); synchronized(this) { modelCache.clearCache(); } } }
@Override protected TemplateModel createModel(Class clazz) throws TemplateModelException { return new StaticModel(clazz, getWrapper()); } }
private void introspectClassInternal(Class clazz) { String className = clazz.getName(); if(cachedClassNames.contains(className)) { if(logger.isInfoEnabled()) { logger.info("Detected a reloaded class [" + className + "]. Clearing BeansWrapper caches."); } // Class reload detected, throw away caches classCache.clear(); cachedClassNames = new HashSet(); synchronized(this) { modelCache.clearCache(); } staticModels.clearCache(); if(enumModels != null) { enumModels.clearCache(); } } classCache.put(clazz, populateClassMap(clazz)); cachedClassNames.add(className); }
trueModel = new BooleanModel(Boolean.TRUE, this); staticModels = new StaticModels(this); enumModels = new _EnumModels(this); modelCache = new BeansModelCache(this);
protected TemplateModel createModel(Class clazz) throws TemplateModelException { return new StaticModel(clazz, getWrapper()); } }
staticModels.clearCache();
trueModel = new BooleanModel(Boolean.TRUE, this); staticModels = new StaticModels(this); enumModels = new _EnumModels(this); modelCache = new BeansModelCache(this);
@Override protected TemplateModel createModel(Class clazz) throws TemplateModelException { return new StaticModel(clazz, getWrapper()); } }