org.springframework.cglib.proxy.Factory.getCallback()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(3.1k)|赞(0)|评价(0)|浏览(114)

本文整理了Java中org.springframework.cglib.proxy.Factory.getCallback()方法的一些代码示例,展示了Factory.getCallback()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Factory.getCallback()方法的具体详情如下:
包路径:org.springframework.cglib.proxy.Factory
类名称:Factory
方法名:getCallback

Factory.getCallback介绍

暂无

代码示例

代码示例来源:origin: spring-projects/spring-framework

@Override
  public Object intercept(Object proxy, Method method, Object[] args, MethodProxy methodProxy) {
    Object other = args[0];
    if (proxy == other) {
      return true;
    }
    if (other instanceof Factory) {
      Callback callback = ((Factory) other).getCallback(INVOKE_EQUALS);
      if (!(callback instanceof EqualsInterceptor)) {
        return false;
      }
      AdvisedSupport otherAdvised = ((EqualsInterceptor) callback).advised;
      return AopProxyUtils.equalsInProxy(this.advised, otherAdvised);
    }
    else {
      return false;
    }
  }
}

代码示例来源:origin: org.aksw.jena-sparql-api/jena-sparql-api-mapper

public static MethodInterceptorRdf getMethodInterceptor(Object o) {
  MethodInterceptorRdf result = null;
  if(o != null && Enhancer.isEnhanced(o.getClass())) {
    Factory factory = (Factory)o;
    Callback callback = factory.getCallback(0);
    result = callback != null && callback instanceof MethodInterceptorRdf
        ? (MethodInterceptorRdf)callback : null;
  }
  return result;
}

代码示例来源:origin: SmartDataAnalytics/jena-sparql-api

public static MethodInterceptorRdf getMethodInterceptor(Object o) {
  MethodInterceptorRdf result = null;
  if(o != null && Enhancer.isEnhanced(o.getClass())) {
    Factory factory = (Factory)o;
    Callback callback = factory.getCallback(0);
    result = callback != null && callback instanceof MethodInterceptorRdf
        ? (MethodInterceptorRdf)callback : null;
  }
  return result;
}

代码示例来源:origin: fang-yan-peng/eagle

@Override
  public Object intercept(Object proxy, Method method, Object[] args, MethodProxy methodProxy) {
    Object other = args[0];
    if (proxy == other) {
      return true;
    }
    if (other instanceof Factory) {
      Callback callback = ((Factory) other).getCallback(INVOKE_EQUALS);
      if (!(callback instanceof EagleTraceCglibProxy.EqualsInterceptor)) {
        return false;
      }
      AdvisedSupport otherAdvised = ((EagleTraceCglibProxy.EqualsInterceptor) callback).advised;
      return AopProxyUtils.equalsInProxy(this.advised, otherAdvised);
    } else {
      return false;
    }
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aop

@Override
  public Object intercept(Object proxy, Method method, Object[] args, MethodProxy methodProxy) {
    Object other = args[0];
    if (proxy == other) {
      return true;
    }
    if (other instanceof Factory) {
      Callback callback = ((Factory) other).getCallback(INVOKE_EQUALS);
      if (!(callback instanceof EqualsInterceptor)) {
        return false;
      }
      AdvisedSupport otherAdvised = ((EqualsInterceptor) callback).advised;
      return AopProxyUtils.equalsInProxy(this.advised, otherAdvised);
    }
    else {
      return false;
    }
  }
}

代码示例来源:origin: apache/servicemix-bundles

@Override
  public Object intercept(Object proxy, Method method, Object[] args, MethodProxy methodProxy) {
    Object other = args[0];
    if (proxy == other) {
      return true;
    }
    if (other instanceof Factory) {
      Callback callback = ((Factory) other).getCallback(INVOKE_EQUALS);
      if (!(callback instanceof EqualsInterceptor)) {
        return false;
      }
      AdvisedSupport otherAdvised = ((EqualsInterceptor) callback).advised;
      return AopProxyUtils.equalsInProxy(this.advised, otherAdvised);
    }
    else {
      return false;
    }
  }
}

相关文章