/** * Checks if type or member is final * * @param type Type or member * @return True if final, false otherwise */ public static boolean isTypeOrAnyMethodFinal(Class<?> type) { return isFinal(type) || getNonPrivateNonStaticFinalMethod(type) != null; }
/** * Indicates if the type if final * * @return True if final, false otherwise * @see org.jboss.weld.annotated.enhanced.EnhancedAnnotated#isFinal() */ @Override public boolean isFinal() { return Reflections.isFinal(getDelegate()); }
/** * Indicates if the type if final * * @return True if final, false otherwise * @see org.jboss.weld.annotated.enhanced.EnhancedAnnotated#isFinal() */ @Override public boolean isFinal() { return Reflections.isFinal(getDelegate()); }
/** * Indicates if the member if final * * @return True if final, false otherwise * @see org.jboss.weld.annotated.enhanced.EnhancedAnnotated#isFinal() */ public boolean isFinal() { return Reflections.isFinal(getDelegate()); }
/** * Indicates if the member if final * * @return True if final, false otherwise * @see org.jboss.weld.annotated.enhanced.EnhancedAnnotated#isFinal() */ public boolean isFinal() { return Reflections.isFinal(getDelegate()); }
/** * Checks if type or member is final * * @param type Type or member * @return True if final, false otherwise */ public static boolean isTypeOrAnyMethodFinal(Class<?> type) { return isFinal(type) || getNonPrivateNonStaticFinalMethod(type) != null; }
/** * Indicates if the type if final * * @return True if final, false otherwise * @see org.jboss.weld.annotated.enhanced.EnhancedAnnotated#isFinal() */ @Override public boolean isFinal() { return Reflections.isFinal(getDelegate()); }
/** * Checks if type or member is final * * @param type Type or member * @return True if final, false otherwise */ public static boolean isTypeOrAnyMethodFinal(Class<?> type) { return isFinal(type) || getNonPrivateNonStaticFinalMethod(type) != null; }
/** * Indicates if the member if final * * @return True if final, false otherwise * @see org.jboss.weld.annotated.enhanced.EnhancedAnnotated#isFinal() */ public boolean isFinal() { return Reflections.isFinal(getDelegate()); }
/** * Indicates if the member if final * * @return True if final, false otherwise * @see org.jboss.weld.annotated.enhanced.EnhancedAnnotated#isFinal() */ public boolean isFinal() { return Reflections.isFinal(getDelegate()); }
/** * Indicates if the type if final * * @return True if final, false otherwise * @see org.jboss.weld.annotated.enhanced.EnhancedAnnotated#isFinal() */ @Override public boolean isFinal() { return Reflections.isFinal(getDelegate()); }
public static Method getNonPrivateNonStaticFinalMethod(Class<?> type) { for (Class<?> clazz = type; clazz != null && clazz != Object.class; clazz = clazz.getSuperclass()) { for (Method method : AccessController.doPrivileged(new GetDeclaredMethodsAction(clazz))) { if (isFinal(method) && !isPrivate(method) && !isStatic(method)) { return method; } } } return null; }
public static Method getNonPrivateNonStaticFinalMethod(Class<?> type) { for (Class<?> clazz = type; clazz != null && clazz != Object.class; clazz = clazz.getSuperclass()) { for (Method method : AccessController.doPrivileged(new GetDeclaredMethodsAction(clazz))) { if (isFinal(method) && !isPrivate(method) && !isStatic(method)) { return method; } } } return null; }
private void initPassivationCapable() { this.passivationCapableBean = !Reflections.isFinal(getEnhancedAnnotated().getJavaClass()) || Reflections.isSerializable(getEnhancedAnnotated().getJavaClass()); if (isNormalScoped()) { this.passivationCapableDependency = true; } else if (getScope().equals(Dependent.class) && passivationCapableBean) { this.passivationCapableDependency = true; } else { this.passivationCapableDependency = false; } }
private void initPassivationCapable() { this.passivationCapableBean = !Reflections.isFinal(getEnhancedAnnotated().getJavaClass()) || Reflections.isSerializable(getEnhancedAnnotated().getJavaClass()); if (isNormalScoped()) { this.passivationCapableDependency = true; } else if (getScope().equals(Dependent.class) && passivationCapableBean) { this.passivationCapableDependency = true; } else { this.passivationCapableDependency = false; } }
private void initPassivationCapable() { this.passivationCapableBean = !Reflections.isFinal(getEnhancedAnnotated().getJavaClass()) || Reflections.isSerializable(getEnhancedAnnotated().getJavaClass()); if (isNormalScoped()) { this.passivationCapableDependency = true; } else if (getScope().equals(Dependent.class) && passivationCapableBean) { this.passivationCapableDependency = true; } else { this.passivationCapableDependency = false; } }
@Override public T create(CreationalContext<T> creationalContext) { final T beanInstance = getProducer().produce(creationalContext); if (Reflections.isFinal(rawType) || Serializable.class.isAssignableFrom(beanInstance.getClass())) { return checkReturnValue(beanInstance); } else { BeanInstance proxyBeanInstance = new EnterpriseTargetBeanInstance(getTypes(), new CallableMethodHandler(new EEResourceCallable<T>(getBeanManager(), this, creationalContext, beanInstance))); return checkReturnValue(proxyFactory.create(proxyBeanInstance)); } }
@Override public T create(CreationalContext<T> creationalContext) { final T beanInstance = getProducer().produce(creationalContext); if (Reflections.isFinal(rawType) || Serializable.class.isAssignableFrom(beanInstance.getClass())) { return checkReturnValue(beanInstance); } else { BeanInstance proxyBeanInstance = new EnterpriseTargetBeanInstance(getTypes(), new CallableMethodHandler(new EEResourceCallable<T>(getBeanManager(), this, creationalContext, beanInstance))); return checkReturnValue(proxyFactory.create(proxyBeanInstance)); } }
@Override public T create(CreationalContext<T> creationalContext) { final T beanInstance = getProducer().produce(creationalContext); if (Reflections.isFinal(rawType) || Serializable.class.isAssignableFrom(beanInstance.getClass())) { return checkReturnValue(beanInstance); } else { BeanInstance proxyBeanInstance = new EnterpriseTargetBeanInstance(getTypes(), new CallableMethodHandler(new EEResourceCallable<T>(getBeanManager(), this, creationalContext, beanInstance))); return checkReturnValue(proxyFactory.create(proxyBeanInstance)); } }
@Override public T create(CreationalContext<T> creationalContext) { final T beanInstance = getProducer().produce(creationalContext); if (Reflections.isFinal(rawType) || Serializable.class.isAssignableFrom(beanInstance.getClass())) { return checkReturnValue(beanInstance); } else { BeanInstance proxyBeanInstance = new EnterpriseTargetBeanInstance(getTypes(), new CallableMethodHandler(new EEResourceCallable<T>(getBeanManager(), this, creationalContext, beanInstance))); return checkReturnValue(proxyFactory.create(proxyBeanInstance)); } }