private Object getIntroductionDelegateFor(Object targetObject) { synchronized (this.delegateMap) { if (this.delegateMap.containsKey(targetObject)) { return this.delegateMap.get(targetObject); } else { Object delegate = createNewDelegate(); this.delegateMap.put(targetObject, delegate); return delegate; } } }
public DelegatePerTargetObjectIntroductionInterceptor(Class<?> defaultImplType, Class<?> interfaceType) { this.defaultImplType = defaultImplType; this.interfaceType = interfaceType; // Create a new delegate now (but don't store it in the map). // We do this for two reasons: // 1) to fail early if there is a problem instantiating delegates // 2) to populate the interface map once and once only Object delegate = createNewDelegate(); implementInterfacesOnObject(delegate); suppressInterface(IntroductionInterceptor.class); suppressInterface(DynamicIntroductionAdvice.class); }
private Object getIntroductionDelegateFor(Object targetObject) { synchronized (this.delegateMap) { if (this.delegateMap.containsKey(targetObject)) { return this.delegateMap.get(targetObject); } else { Object delegate = createNewDelegate(); this.delegateMap.put(targetObject, delegate); return delegate; } } }
private Object getIntroductionDelegateFor(Object targetObject) { synchronized (this.delegateMap) { if (this.delegateMap.containsKey(targetObject)) { return this.delegateMap.get(targetObject); } else { Object delegate = createNewDelegate(); this.delegateMap.put(targetObject, delegate); return delegate; } } }
public DelegatePerTargetObjectIntroductionInterceptor(Class<?> defaultImplType, Class<?> interfaceType) { this.defaultImplType = defaultImplType; this.interfaceType = interfaceType; // Create a new delegate now (but don't store it in the map). // We do this for two reasons: // 1) to fail early if there is a problem instantiating delegates // 2) to populate the interface map once and once only Object delegate = createNewDelegate(); implementInterfacesOnObject(delegate); suppressInterface(IntroductionInterceptor.class); suppressInterface(DynamicIntroductionAdvice.class); }
public DelegatePerTargetObjectIntroductionInterceptor(Class<?> defaultImplType, Class<?> interfaceType) { this.defaultImplType = defaultImplType; this.interfaceType = interfaceType; // Create a new delegate now (but don't store it in the map). // We do this for two reasons: // 1) to fail early if there is a problem instantiating delegates // 2) to populate the interface map once and once only Object delegate = createNewDelegate(); implementInterfacesOnObject(delegate); suppressInterface(IntroductionInterceptor.class); suppressInterface(DynamicIntroductionAdvice.class); }