Examples of MethodPersistentReference


Examples of org.jboss.aop.util.reference.MethodPersistentReference

/* 49 */     if ((invocation instanceof MethodInvocation))
/*    */     {
/* 52 */       MethodInvocation methodInvocation = (MethodInvocation)invocation;
/* 53 */       long methodHash = methodInvocation.getMethodHash();
/* 54 */       HashMap methodMap = ClassProxyFactory.getMethodMap(this.obj.getClass());
/* 55 */       MethodPersistentReference ref = (MethodPersistentReference)methodMap.get(new Long(methodHash));
/* 56 */       Method method = (Method)ref.get();
/* 57 */       Object[] args = methodInvocation.getArguments();
/*    */       try
/*    */       {
/* 60 */         return method.invoke(this.obj, args);
/*    */       }
View Full Code Here

Examples of org.jboss.aop.util.reference.MethodPersistentReference

/*    */   {
/*    */   }
/*    */
/*    */   public Method getMethod()
/*    */   {
/* 62 */     MethodPersistentReference ref = (MethodPersistentReference)this.proxy.getMethodMap().get(new Long(this.methodHash));
/* 63 */     return (Method)ref.get();
/*    */   }
View Full Code Here

Examples of org.jboss.aop.util.reference.MethodPersistentReference

/*     */
/* 335 */       if (!java.lang.reflect.Modifier.isVolatile(declaredMethods[i].getModifiers()))
/*     */       {
/* 337 */         long hash = MethodHashing.methodHash(declaredMethods[i]);
/* 338 */         if (!ignoredHash.contains(new Long(hash)))
/* 339 */           advised.put(new Long(hash), new MethodPersistentReference(declaredMethods[i], 2));
/*     */       }
/*     */       else
/*     */       {
/* 343 */         long hash = MethodHashing.methodHash(declaredMethods[i]);
/* 344 */         ignoredHash.add(new Long(hash));
View Full Code Here

Examples of org.jboss.aop.util.reference.MethodPersistentReference

/*     */   }
/*     */
/*     */   public static Method findMethodByHash(Class clazz, Long hash) throws Exception
/*     */   {
/*  61 */     Map hashes = getMethodHashes(clazz);
/*  62 */     MethodPersistentReference ref = (MethodPersistentReference)hashes.get(hash);
/*  63 */     if (ref != null)
/*     */     {
/*  65 */       return ref.getMethod();
/*     */     }
/*     */
/*  68 */     if (clazz.isInterface())
/*     */     {
/*  70 */       Class[] interfaces = clazz.getInterfaces();
View Full Code Here

Examples of org.jboss.aop.util.reference.MethodPersistentReference

/*     */     {
/*     */       try
/*     */       {
/* 273 */         long hash = methodHash(methods[i]);
/*     */
/* 275 */         map.put(new Long(hash), new MethodPersistentReference(methods[i], 2));
/*     */       }
/*     */       catch (Exception e)
/*     */       {
/*     */       }
/*     */     }
View Full Code Here

Examples of org.jboss.aop.util.reference.MethodPersistentReference

            // (in superclasses) are not added either.
            if(!java.lang.reflect.Modifier.isVolatile( declaredMethods[i].getModifiers()))
            {
               long hash = org.jboss.aop.util.MethodHashing.methodHash(declaredMethods[i]);
               if(!ignoredHash.contains(new Long(hash)))
                  advised.put(new Long(hash), new MethodPersistentReference(declaredMethods[i], PersistentReference.REFERENCE_SOFT));
            }
            else
            {
               long hash = org.jboss.aop.util.MethodHashing.methodHash(declaredMethods[i]);
               ignoredHash.add(new Long(hash));
View Full Code Here

Examples of org.jboss.aop.util.reference.MethodPersistentReference

            // (in superclasses) are not added either.
            if(!java.lang.reflect.Modifier.isVolatile( declaredMethods[i].getModifiers()))
            {
               long hash = org.jboss.aop.util.MethodHashing.methodHash(declaredMethods[i]);
               if(!ignoredHash.contains(new Long(hash)))
                  advised.put(new Long(hash), new MethodPersistentReference(declaredMethods[i], PersistentReference.REFERENCE_WEAK));
            }
            else
            {
               long hash = org.jboss.aop.util.MethodHashing.methodHash(declaredMethods[i]);
               ignoredHash.add(new Long(hash));
View Full Code Here

Examples of org.jboss.aop.util.reference.MethodPersistentReference

         {
            MethodInvocation methodInvocation = (MethodInvocation) invocation;
            // For non-advised methods, we can only do public method invocations
            long methodHash = methodInvocation.getMethodHash();
            HashMap methodMap = ClassProxyFactory.getMethodMap(target.getClass());
            MethodPersistentReference ref = (MethodPersistentReference)methodMap.get(new Long(methodHash));
            Method method = (Method)ref.get();
            Object[] args = methodInvocation.getArguments();
            try
            {
               return new InvocationResponse(method.invoke(target, args));
            }
View Full Code Here

Examples of org.jboss.aop.util.reference.MethodPersistentReference

            // (in superclasses) are not added either.
            if(!java.lang.reflect.Modifier.isVolatile( declaredMethods[i].getModifiers()))
            {
               long hash = org.jboss.aop.util.MethodHashing.methodHash(declaredMethods[i]);
               if(!ignoredHash.contains(new Long(hash)))
                  advised.put(new Long(hash), new MethodPersistentReference(declaredMethods[i], PersistentReference.REFERENCE_SOFT));
            }
            else
            {
               long hash = org.jboss.aop.util.MethodHashing.methodHash(declaredMethods[i]);
               ignoredHash.add(new Long(hash));
View Full Code Here

Examples of org.jboss.serial.references.MethodPersistentReference

        return (Method)privateMethodRead.get();
    }

    public void setPrivateMethodRead(Method privateMethodRead)
    {
        this.privateMethodRead = new MethodPersistentReference(privateMethodRead,REFERENCE_TYPE_IN_USE);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.