protected AnnotationConfigurator getAnnotationConfigurator() { if (_annotationConfigurator == null) { _annotationConfigurator = new AnnotationConfigurator(); } return _annotationConfigurator; }
public DefaultAnnotationProvider() { super(); _filter = new _ClassByteCodeAnnotationFilter(); }
private void checkAnnotation(Class<?> clazz, Object instance) throws NamingException, IllegalAccessException, InvocationTargetException { // Initialize fields annotations Field[] fields = getDeclaredFieldBeans(clazz); for (int i = 0; i < fields.length; i++) { Field field = fields[i]; checkFieldAnnotation(field, instance); } // Initialize methods annotations Method[] methods = getDeclaredMethods(clazz); for (int i = 0; i < methods.length; i++) { Method method = methods[i]; checkMethodAnnotation(method, instance); } }
protected void doPreDestroy(Object value, String name, String scope) { if(value != null) { //AnnotatedManagedBeanHandler handler = // new AnnotatedManagedBeanHandler(value, scope, name); //handler.invokePreDestroy(); try { LifecycleProviderFactory.getLifecycleProviderFactory().getLifecycleProvider(null).destroyInstance(value); } catch (IllegalAccessException e) { log.error("", e); } catch (InvocationTargetException e) { log.error("", e); } } } }
public static LifecycleProviderFactory getLifecycleProviderFactory() { // Since we always provide a StartupFacesContext on initialization time, this is safe: return getLifecycleProviderFactory(FacesContext.getCurrentInstance().getExternalContext()); }
@Override public FacesConfig getAnnotationsFacesConfig(ExternalContext ectx, boolean metadataComplete) { return getAnnotationConfigurator().createFacesConfig(ectx, metadataComplete); }
public Object newInstance(String className) throws InstantiationException, IllegalAccessException, NamingException, InvocationTargetException, ClassNotFoundException { Class clazz = ClassUtils.classForName(className); Object object = clazz.newInstance(); processAnnotations(object); //postConstruct(object); return object; }
protected void checkMethodAnnotation(Method method, Object instance) throws NamingException, IllegalAccessException, InvocationTargetException { if (method.isAnnotationPresent(Resource.class)) { Resource annotation = method.getAnnotation(Resource.class); lookupMethodResource(context, instance, method, annotation.name()); } }
protected void checkFieldAnnotation(Field field, Object instance) throws NamingException, IllegalAccessException { if (field.isAnnotationPresent(Resource.class)) { Resource annotation = field.getAnnotation(Resource.class); lookupFieldResource(context, instance, field, annotation.name()); } }
protected AnnotationConfigurator getAnnotationConfigurator() { if (_annotationConfigurator == null) { _annotationConfigurator = new AnnotationConfigurator(); } return _annotationConfigurator; }
public static LifecycleProviderFactory getLifecycleProviderFactory() { // Since we always provide a StartupFacesContext on initialization time, this is safe: return getLifecycleProviderFactory(FacesContext.getCurrentInstance().getExternalContext()); }
public DefaultAnnotationProvider() { super(); _filter = new _ClassByteCodeAnnotationFilter(); }
@Override public FacesConfig getAnnotationsFacesConfig(ExternalContext ectx, boolean metadataComplete) { return getAnnotationConfigurator().createFacesConfig(ectx, metadataComplete); }
protected AnnotationConfigurator getAnnotationConfigurator() { if (_annotationConfigurator == null) { _annotationConfigurator = new AnnotationConfigurator(); } return _annotationConfigurator; }
public static LifecycleProviderFactory getLifecycleProviderFactory() { // Since we always provide a StartupFacesContext on initialization time, this is safe: return getLifecycleProviderFactory(FacesContext.getCurrentInstance().getExternalContext()); }
public DefaultAnnotationProvider() { super(); _filter = new _ClassByteCodeAnnotationFilter(); }
@Override public FacesConfig getAnnotationsFacesConfig(ExternalContext ectx, boolean metadataComplete) { return getAnnotationConfigurator().createFacesConfig(ectx, metadataComplete); }
protected AnnotationConfigurator getAnnotationConfigurator() { if (_annotationConfigurator == null) { _annotationConfigurator = new AnnotationConfigurator(); } return _annotationConfigurator; }
protected AnnotationConfigurator getAnnotationConfigurator() { if (_annotationConfigurator == null) { _annotationConfigurator = new AnnotationConfigurator(); } return _annotationConfigurator; }
protected AnnotationConfigurator getAnnotationConfigurator() { if (_annotationConfigurator == null) { _annotationConfigurator = new AnnotationConfigurator(); } return _annotationConfigurator; }