/** * This method should not be called in regular flow. * Technically speaking {@link #wrapCachedClass(Class)} uses {@link EnhancerFactoryData} as a cache value, * and the latter enables faster instantiation than plain old reflection lookup and invoke. * This method is left intact for backward compatibility reasons: just in case it was ever used. * @param type class to instantiate * @return newly created proxy instance * @throws Exception if something goes wrong */ protected Object firstInstance(Class type) throws Exception { if (classOnly) { return type; } else { return createUsingReflection(type); } }
/** * This method should not be called in regular flow. * Technically speaking {@link #wrapCachedClass(Class)} uses {@link EnhancerFactoryData} as a cache value, * and the latter enables faster instantiation than plain old reflection lookup and invoke. * This method is left intact for backward compatibility reasons: just in case it was ever used. * @param type class to instantiate * @return newly created proxy instance * @throws Exception if something goes wrong */ protected Object firstInstance(Class type) throws Exception { if (classOnly) { return type; } else { return createUsingReflection(type); } }
/** * This method should not be called in regular flow. * Technically speaking {@link #wrapCachedClass(Class)} uses {@link EnhancerFactoryData} as a cache value, * and the latter enables faster instantiation than plain old reflection lookup and invoke. * This method is left intact for backward compatibility reasons: just in case it was ever used. * @param type class to instantiate * @return newly created proxy instance * @throws Exception if something goes wrong */ protected Object firstInstance(Class type) throws Exception { if (classOnly) { return type; } else { return createUsingReflection(type); } }
/** * This method should not be called in regular flow. * Technically speaking {@link #wrapCachedClass(Class)} uses {@link EnhancerFactoryData} as a cache value, * and the latter enables faster instantiation than plain old reflection lookup and invoke. * This method is left intact for backward compatibility reasons: just in case it was ever used. * @param type class to instantiate * @return newly created proxy instance * @throws Exception if something goes wrong */ protected Object firstInstance(Class type) throws Exception { if (classOnly) { return type; } else { return createUsingReflection(type); } }