public final class DefaultProxyInstantiator extends java.lang.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()
Called by Weld when it is shutting down, allowing the service to perform any cleanup needed.
|
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(java.lang.Class<T> clazz)
Create a new instance of a proxy class.
|
<T> UnproxyableResolutionException |
validateNoargConstructor(java.lang.reflect.Constructor<T> constructor,
java.lang.Class<?> clazz,
Bean<?> declaringBean)
Validate, whether the given constructor is sufficient for a class to be proxyable.
|
public static final ProxyInstantiator INSTANCE
public <T> T newInstance(java.lang.Class<T> clazz)
throws java.lang.InstantiationException,
java.lang.IllegalAccessException
ProxyInstantiatornewInstance in interface ProxyInstantiatorT - the proxy classclazz - the classjava.lang.InstantiationExceptionjava.lang.IllegalAccessExceptionpublic <T> UnproxyableResolutionException validateNoargConstructor(java.lang.reflect.Constructor<T> constructor, java.lang.Class<?> clazz, Bean<?> declaringBean) throws UnproxyableResolutionException
ProxyInstantiatorvalidateNoargConstructor in interface ProxyInstantiatorconstructor - the given constructorclazz - the given classdeclaringBean - the declaring beanUnproxyableResolutionException if the given class is not proxyable due to the given constructor, null otherwiseUnproxyableResolutionExceptionpublic boolean isUsingConstructor()
ProxyInstantiatorisUsingConstructor in interface ProxyInstantiatorCopyright © 2015. All Rights Reserved.