Package org.jboss.aop.util.reference

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


            // (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(Long.valueOf(hash)))
                  advised.put(Long.valueOf(hash), new MethodPersistentReference(declaredMethods[i], PersistentReference.REFERENCE_WEAK));
            }
            else
            {
               long hash = org.jboss.aop.util.MethodHashing.methodHash(declaredMethods[i]);
               ignoredHash.add(Long.valueOf(hash));
View Full Code Here

   }

   public Method getMethod()
   {
      MethodPersistentReference ref = proxy.getMethodMap().get(Long.valueOf(methodHash));
      return (Method)ref.get();
   }
View Full Code Here

   }

   public static Method findMethodByHash(Class<?> clazz, Long hash) throws Exception
   {
      Map<Long, MethodPersistentReference> hashes = getMethodHashes(clazz);
      MethodPersistentReference ref = hashes.get(hash);
      if (ref != null)
      {
         return ref.getMethod();
      }

      if (clazz.isInterface())
      {
         final Class<?>[] interfaces = clazz.getInterfaces() ;
View Full Code Here

      {
         try
         {
            long hash = methodHash(methods[i]);
            //Use Clebert's Persistent References so we don't get memory leaks
            map.put(Long.valueOf(hash), new MethodPersistentReference(methods[i], PersistentReference.REFERENCE_SOFT));
         }
         catch (Exception ignore)
         {
         }
      }
View Full Code Here

   }

   public static Method findMethodByHash(Class clazz, Long hash) throws Exception
   {
      Map hashes = getMethodHashes(clazz);
      MethodPersistentReference ref = (MethodPersistentReference)hashes.get(hash);
      if (ref != null)
      {
         return ref.getMethod();
      }

      if (clazz.isInterface())
      {
         final Class[] interfaces = clazz.getInterfaces() ;
View Full Code Here

      {
         try
         {
            long hash = methodHash(methods[i]);
            //Use Clebert's Persistent References so we don't get memory leaks
            map.put(new Long(hash), new MethodPersistentReference(methods[i], PersistentReference.REFERENCE_SOFT));
         }
         catch (Exception e)
         {
         }
      }
View Full Code Here

         {
            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

            // (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

            // (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

TOP

Related Classes of org.jboss.aop.util.reference.MethodPersistentReference

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.