public final class DefaultProxyInstantiator extends Object implements ProxyInstantiator
ProxyInstantiator
implementation that uses proxy class' no-arg constructor to create a new instance.ProxyInstantiator.Factory
Modifier and Type | Field and Description |
---|---|
static ProxyInstantiator |
INSTANCE |
Modifier and Type | Method and Description |
---|---|
void |
cleanup() |
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.
|
public static final ProxyInstantiator INSTANCE
public <T> T newInstance(Class<T> clazz) throws InstantiationException, IllegalAccessException
ProxyInstantiator
newInstance
in interface ProxyInstantiator
T
- the proxy classclazz
- the classInstantiationException
IllegalAccessException
public <T> UnproxyableResolutionException validateNoargConstructor(Constructor<T> constructor, Class<?> clazz, javax.enterprise.inject.spi.Bean<?> declaringBean) throws UnproxyableResolutionException
ProxyInstantiator
validateNoargConstructor
in interface ProxyInstantiator
constructor
- the given constructorclazz
- the given classdeclaringBean
- the declaring beanUnproxyableResolutionException
if the given class is not proxyable due to the given constructor, null otherwiseUnproxyableResolutionException
public boolean isUsingConstructor()
ProxyInstantiator
isUsingConstructor
in interface ProxyInstantiator
public void cleanup()
cleanup
in interface org.jboss.weld.bootstrap.api.Service
Copyright © 2016. All rights reserved.