/** * Check equality of the proxied interfaces behind the given AdvisedSupport objects. */ public static boolean equalsProxiedInterfaces(AdvisedSupport a, AdvisedSupport b) { return Arrays.equals(a.getProxiedInterfaces(), b.getProxiedInterfaces()); }
/** * Determine whether the supplied {@link AdvisedSupport} has only the * {@link org.springframework.aop.SpringProxy} interface specified * (or no proxy interfaces specified at all). */ private boolean hasNoUserSuppliedProxyInterfaces(AdvisedSupport config) { Class<?>[] ifcs = config.getProxiedInterfaces(); return (ifcs.length == 0 || (ifcs.length == 1 && SpringProxy.class.isAssignableFrom(ifcs[0]))); }
Class<?>[] specifiedInterfaces = advised.getProxiedInterfaces(); if (specifiedInterfaces.length == 0) { advised.setInterfaces(targetClass.getInterfaces()); specifiedInterfaces = advised.getProxiedInterfaces();
/** * Check equality of the proxied interfaces behind the given AdvisedSupport objects. */ public static boolean equalsProxiedInterfaces(AdvisedSupport a, AdvisedSupport b) { return Arrays.equals(a.getProxiedInterfaces(), b.getProxiedInterfaces()); }
/** * Check equality of the proxied interfaces behind the given AdvisedSupport objects. */ public static boolean equalsProxiedInterfaces(AdvisedSupport a, AdvisedSupport b) { return Arrays.equals(a.getProxiedInterfaces(), b.getProxiedInterfaces()); }
/** * Check equality of the proxied interfaces behind the given AdvisedSupport objects. */ public static boolean equalsProxiedInterfaces(AdvisedSupport a, AdvisedSupport b) { return Arrays.equals(a.getProxiedInterfaces(), b.getProxiedInterfaces()); }
/** * Determine whether the supplied {@link AdvisedSupport} has only the * {@link org.springframework.aop.SpringProxy} interface specified * (or no proxy interfaces specified at all). */ private boolean hasNoUserSuppliedProxyInterfaces(AdvisedSupport config) { Class<?>[] ifcs = config.getProxiedInterfaces(); return (ifcs.length == 0 || (ifcs.length == 1 && SpringProxy.class.isAssignableFrom(ifcs[0]))); }
private boolean hasNoUserSuppliedProxyInterfaces(AdvisedSupport config) { Class<?>[] interfaces = config.getProxiedInterfaces(); return (interfaces.length == 0 || (interfaces.length == 1 && SpringProxy.class.equals(interfaces[0]))); } }
/** * Determine whether the supplied {@link AdvisedSupport} has only the * {@link org.springframework.aop.SpringProxy} interface specified * (or no proxy interfaces specified at all). */ private boolean hasNoUserSuppliedProxyInterfaces(AdvisedSupport config) { Class<?>[] ifcs = config.getProxiedInterfaces(); return (ifcs.length == 0 || (ifcs.length == 1 && SpringProxy.class.isAssignableFrom(ifcs[0]))); }
/** * Get complete set of interfaces to proxy. This will always add the Advised interface * unless the AdvisedSupport's "opaque" flag is true. * @return the complete set of interfaces to proxy */ public static Class[] completeProxiedInterfaces(AdvisedSupport advised) { // Won't include Advised, which may be necessary. Class[] specifiedInterfaces = advised.getProxiedInterfaces(); Class[] proxiedInterfaces = specifiedInterfaces; if (!advised.isOpaque() && !advised.isInterfaceProxied(Advised.class)) { // We need to add the Advised interface. proxiedInterfaces = new Class[specifiedInterfaces.length + 1]; proxiedInterfaces[0] = Advised.class; System.arraycopy(specifiedInterfaces, 0, proxiedInterfaces, 1, specifiedInterfaces.length); } return proxiedInterfaces; }
public AopProxy createAopProxy(AdvisedSupport advisedSupport) throws AopConfigException { if (advisedSupport.isOptimize() || advisedSupport.isProxyTargetClass() || advisedSupport.getProxiedInterfaces().length == 0) { if (!cglibAvailable) { throw new AopConfigException( "Cannot proxy target class because CGLIB2 is not available. " + "Add CGLIB to the class path or specify proxy interfaces."); } return CglibProxyFactory.createCglibProxy(advisedSupport); } else { return new JdkDynamicAopProxy(advisedSupport); } }
Class<?>[] specifiedInterfaces = advised.getProxiedInterfaces(); if (specifiedInterfaces.length == 0) { advised.setInterfaces(targetClass.getInterfaces()); specifiedInterfaces = advised.getProxiedInterfaces();
Class<?>[] specifiedInterfaces = advised.getProxiedInterfaces(); if (specifiedInterfaces.length == 0) { advised.setInterfaces(targetClass.getInterfaces()); specifiedInterfaces = advised.getProxiedInterfaces();