/** * Indicates if a class is proxyable * * @param type The class to test * @return True if proxyable, false otherwise */ public static boolean isTypeProxyable(Type type, ServiceRegistry services) { return getUnproxyableTypeException(type, services) == null; }
/** * Indicates if a class is proxyable * * @param type The class to test * @return True if proxyable, false otherwise */ public static boolean isTypeProxyable(Type type, ServiceRegistry services) { return getUnproxyableTypeException(type, services) == null; }
/** * Indicates if a class is proxyable * * @param type The class to test * @return True if proxyable, false otherwise */ public static boolean isTypeProxyable(Type type, ServiceRegistry services) { return getUnproxyableTypeException(type, services) == null; }
/** * Indicates if a class is proxyable * * @param type The class to test * @return True if proxyable, false otherwise */ public static boolean isTypeProxyable(Type type, ServiceRegistry services) { return getUnproxyableTypeException(type, services) == null; }
/** * Indicates if a class is proxyable * * @param type The class to test * @return True if proxyable, false otherwise */ public static boolean isTypeProxyable(Type type, ServiceRegistry services) { return getUnproxyableTypeException(type, services) == null; }
/** * Indicates if a class is proxyable * * @param type The class to test * @return True if proxyable, false otherwise */ public static boolean isTypeProxyable(Type type, ServiceRegistry services) { return getUnproxyableTypeException(type, services) == null; }
public static UnproxyableResolutionException getUnproxyableTypeException(Type type, ServiceRegistry services) { return getUnproxyableTypeException(type, null, services, false); }
public static UnproxyableResolutionException getUnproxyableTypeException(Type type, ServiceRegistry services) { return getUnproxyableTypeException(type, null, services, false); }
public static UnproxyableResolutionException getUnproxyableTypeException(Type type, ServiceRegistry services) { return getUnproxyableTypeException(type, null, services); }
public static UnproxyableResolutionException getUnproxyableTypeException(Type type, ServiceRegistry services) { return getUnproxyableTypeException(type, null, services, false); }
public static UnproxyableResolutionException getUnproxyableTypeException(Type type, ServiceRegistry services) { return getUnproxyableTypeException(type, null, services, false); }
public static UnproxyableResolutionException getUnproxyableTypeException(Type type, ServiceRegistry services) { return getUnproxyableTypeException(type, null, services, false); }
private static UnproxyableResolutionException getUnproxyableTypesExceptionInt(Iterable<? extends Type> types, Bean<?> declaringBean, ServiceRegistry services) { for (Type apiType : types) { if (Object.class.equals(apiType)) { continue; } UnproxyableResolutionException e = getUnproxyableTypeException(apiType, declaringBean, services, false); if (e != null) { return e; } } return null; }
private static UnproxyableResolutionException getUnproxyableTypesExceptionInt(Iterable<? extends Type> types, Bean<?> declaringBean, ServiceRegistry services) { for (Type apiType : types) { if (Object.class.equals(apiType)) { continue; } UnproxyableResolutionException e = getUnproxyableTypeException(apiType, declaringBean, services, false); if (e != null) { return e; } } return null; }
private static UnproxyableResolutionException getUnproxyableTypesExceptionInt(Iterable<? extends Type> types, Bean<?> declaringBean, ServiceRegistry services) { for (Type apiType : types) { if (Object.class.equals(apiType)) { continue; } UnproxyableResolutionException e = getUnproxyableTypeException(apiType, declaringBean, services, false); if (e != null) { return e; } } return null; }
private static UnproxyableResolutionException getUnproxyableTypesExceptionInt(Iterable<? extends Type> types, Bean<?> declaringBean, ServiceRegistry services) { for (Type apiType : types) { if (Object.class.equals(apiType)) { continue; } UnproxyableResolutionException e = getUnproxyableTypeException(apiType, declaringBean, services); if (e != null) { return e; } } return null; }
private static UnproxyableResolutionException getUnproxyableTypesExceptionInt(Iterable<? extends Type> types, Bean<?> declaringBean, ServiceRegistry services) { for (Type apiType : types) { if (Object.class.equals(apiType)) { continue; } UnproxyableResolutionException e = getUnproxyableTypeException(apiType, declaringBean, services, false); if (e != null) { return e; } } return null; }
private static UnproxyableResolutionException getUnproxyableTypesExceptionInt(Iterable<? extends Type> types, Bean<?> declaringBean, ServiceRegistry services) { for (Type apiType : types) { if (Object.class.equals(apiType)) { continue; } UnproxyableResolutionException e = getUnproxyableTypeException(apiType, declaringBean, services, false); if (e != null) { return e; } } return null; }
/** * Gets a client proxy for a bean * <p/> * Looks for a proxy in the pool. If not found, one is created and added to * the pool if the create argument is true. * * @param bean The bean to get a proxy to * @return the client proxy for the bean */ public <T> T getClientProxy(final Bean<T> bean, Type requestedType) { // let's first try to use the proxy that implements all the bean types T proxy = beanTypeClosureProxyPool.getCastValue(bean); if (proxy == BEAN_NOT_PROXYABLE_MARKER) { /* * the bean may have a type that is not proxyable - this is not a problem as long as the unproxyable * type is not in the type closure of the requested type * https://issues.jboss.org/browse/WELD-1052 */ proxy = requestedTypeClosureProxyPool.getCastValue(new RequestedTypeHolder(requestedType, bean)); if (proxy == BEAN_NOT_PROXYABLE_MARKER) { throw Proxies.getUnproxyableTypeException(requestedType, services()); } } BeanLogger.LOG.lookedUpClientProxy(proxy.getClass(), bean); return proxy; }
/** * Gets a client proxy for a bean * <p/> * Looks for a proxy in the pool. If not found, one is created and added to * the pool if the create argument is true. * * @param bean The bean to get a proxy to * @return the client proxy for the bean */ public <T> T getClientProxy(final Bean<T> bean, Type requestedType) { // let's first try to use the proxy that implements all the bean types T proxy = beanTypeClosureProxyPool.getCastValue(bean); if (proxy == BEAN_NOT_PROXYABLE_MARKER) { /* * the bean may have a type that is not proxyable - this is not a problem as long as the unproxyable * type is not in the type closure of the requested type * https://issues.jboss.org/browse/WELD-1052 */ proxy = requestedTypeClosureProxyPool.getCastValue(new RequestedTypeHolder(requestedType, bean)); if (proxy == BEAN_NOT_PROXYABLE_MARKER) { throw Proxies.getUnproxyableTypeException(requestedType, services()); } } BeanLogger.LOG.lookedUpClientProxy(proxy.getClass(), bean); return proxy; }