Package net.sf.cglib.core

Examples of net.sf.cglib.core.Signature


/*     */   private int i1;
/*     */   private int i2;
/*     */
/*     */   public static MethodProxy create(ClassLoader loader, Class c1, Class c2, String desc, String name1, String name2)
/*     */   {
/*  44 */     Signature sig1 = new Signature(name1, desc);
/*  45 */     Signature sig2 = new Signature(name2, desc);
/*  46 */     FastClass f1 = helper(loader, c1);
/*  47 */     FastClass f2 = helper(loader, c2);
/*  48 */     int i1 = f1.getIndex(sig1);
/*  49 */     int i2 = f2.getIndex(sig2);
/*     */     MethodProxy proxy;
View Full Code Here


/*  392 */     return null;
/*      */   }
/*      */
/*      */   private Signature rename(Signature sig, int index)
/*      */   {
/*  397 */     return new Signature("CGLIB$" + sig.getName() + "$" + index, sig.getDescriptor());
/*      */   }
View Full Code Here

/*  700 */       MethodInfo constructor = (MethodInfo)it.next();
/*  701 */       CodeEmitter e = EmitUtils.begin_method(ce, constructor, 1);
/*  702 */       e.load_this();
/*  703 */       e.dup();
/*  704 */       e.load_args();
/*  705 */       Signature sig = constructor.getSignature();
/*  706 */       seenNull = (seenNull) || (sig.getDescriptor().equals("()V"));
/*  707 */       e.super_invoke_constructor(sig);
/*  708 */       e.invoke_static_this(BIND_CALLBACKS);
/*  709 */       if (!this.interceptDuringConstruction) {
/*  710 */         e.load_this();
/*  711 */         e.push(1);
View Full Code Here

          callback = null;
          final String name = method.getName();
          if (name.startsWith(SUPER_PREFIX)) {
            // Automatically redirect to the super method
            final String methodName = Common.SERVER.getMethodName(superclass, name.substring(SUPER_PREFIX.length()), method.getParameterTypes());
            final Signature superSig = getSig(method, methodName);
            try {
              // Try to get the method in the superclass - prior
              if (!SafeMethod.contains(superClass, methodName, method.getParameterTypes())) {
                throw new RuntimeException("Could not find super method: " + superSig);
              }
View Full Code Here

  public Class<?> getSuperClass() {
    return this.superClass;
  }

  private void addCallback(Method superMethod, CallbackSignature callback) {
    Signature sig = getSig(superMethod);
    this.callbackSignatures.put(sig, callback);
    String sigName = sig.getName();
    if (sigName.startsWith(SUPER_PREFIX)) {
      return;
    }
    String fixedName = Common.SERVER.getMethodName(this.superClass, sigName, superMethod.getParameterTypes());
    if (!fixedName.equals(sigName)) {
      Signature fixedSig = getSig(superMethod, fixedName);
      this.callbackSignatures.put(fixedSig, callback);
    }
  }
View Full Code Here

  private static Signature getSig(Method method) {
    return getSig(method, method.getName());
  }

  private static Signature getSig(Method method, String name) {
    return new Signature(name, Type.getReturnType(method), Type.getArgumentTypes(method));
  }
View Full Code Here

        // it is just a plain old opertaion
        return new KernelOperationInvoker(kernel, method);
    }

    private static int getSuperIndex(Class proxyType, Method method) {
        Signature signature = new Signature(method.getName(), Type.getReturnType(method), Type.getArgumentTypes(method));
        MethodProxy methodProxy = MethodProxy.find(proxyType, signature);
        if (methodProxy != null) {
            return methodProxy.getSuperIndex();
        }
        return -1;
View Full Code Here

        }
        return null;
    }

    private static int getSuperIndex(Class proxyType, Method method) {
        Signature signature = new Signature(method.getName(), Type.getReturnType(method), Type.getArgumentTypes(method));
        MethodProxy methodProxy = MethodProxy.find(proxyType, signature);
        if (methodProxy != null) {
            return methodProxy.getSuperIndex();
        }
        return -1;
View Full Code Here

TOP

Related Classes of net.sf.cglib.core.Signature

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.