public interface ProxyInstantiator
extends org.jboss.weld.bootstrap.api.Service
Class.newInstance()
or using more advanced mechanism (e.g. sun.misc.Unsafe)DefaultProxyInstantiator
,
UnsafeProxyInstantiator
,
ReflectionFactoryProxyInstantiator
Modifier and Type | Interface and Description |
---|---|
static class |
ProxyInstantiator.Factory |
Modifier and Type | Method and Description |
---|---|
boolean |
isUsingConstructor()
Indicates whether this instantiator calls proxy class' no-arg constructor or whether it uses an alternative mechanism to obtain a proxy class instance.
|
<T> T |
newInstance(Class<T> clazz)
Create a new instance of a proxy class.
|
<T> UnproxyableResolutionException |
validateNoargConstructor(Constructor<T> constructor,
Class<?> clazz,
javax.enterprise.inject.spi.Bean<?> declaringBean)
Validate, whether the given constructor is sufficient for a class to be proxyable.
|
<T> T newInstance(Class<T> clazz) throws InstantiationException, IllegalAccessException
T
- the proxy classclazz
- the classInstantiationException
IllegalAccessException
<T> UnproxyableResolutionException validateNoargConstructor(Constructor<T> constructor, Class<?> clazz, javax.enterprise.inject.spi.Bean<?> declaringBean) throws UnproxyableResolutionException
constructor
- the given constructorclazz
- the given classdeclaringBean
- the declaring beanUnproxyableResolutionException
if the given class is not proxyable due to the given constructor, null otherwiseUnproxyableResolutionException
boolean isUsingConstructor()
Copyright © 2019. All rights reserved.