org.jboss.cache.aop.util
Class AopUtil

java.lang.Object
  extended by org.jboss.cache.aop.util.AopUtil

public class AopUtil
extends java.lang.Object

Unitlity methods for put, get and remove Collection classes object.

Author:
Ben Wang

Constructor Summary
AopUtil()
           
 
Method Summary
static void checkObjectType(java.lang.Object obj)
          Check whether the object type is valid.
static Fqn constructFqn(Fqn baseFqn, java.lang.Object relative)
           
static org.jboss.aop.advice.Interceptor findCacheInterceptor(org.jboss.aop.InstanceAdvisor advisor)
          Find existing cache interceptor.
static org.jboss.aop.advice.Interceptor findCacheInterceptor(org.jboss.aop.InstanceAdvisor advisor, Fqn fqn)
          Find cache interceptor with exact fqn.
static org.jboss.aop.advice.Interceptor findCollectionInterceptor(org.jboss.aop.InstanceAdvisor advisor)
          Find existing Collection interceptor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AopUtil

public AopUtil()
Method Detail

findCacheInterceptor

public static org.jboss.aop.advice.Interceptor findCacheInterceptor(org.jboss.aop.InstanceAdvisor advisor,
                                                                    Fqn fqn)
Find cache interceptor with exact fqn.

Parameters:
advisor -
fqn -
Returns:
Interceptor

findCacheInterceptor

public static org.jboss.aop.advice.Interceptor findCacheInterceptor(org.jboss.aop.InstanceAdvisor advisor)
Find existing cache interceptor. Since there is supposedly only one cache interceptor per pojo, this call should suffice. In addition, in cases of cross or circular reference, fqn can be different anyway.

Parameters:
advisor -
Returns:
Interceptor

findCollectionInterceptor

public static org.jboss.aop.advice.Interceptor findCollectionInterceptor(org.jboss.aop.InstanceAdvisor advisor)
Find existing Collection interceptor. Since there is supposedly only one Collection interceptor per instance, this call should suffice. In addition, in cases of cross or circular reference, fqn can be different anyway.

Parameters:
advisor -
Returns:
Interceptor

checkObjectType

public static void checkObjectType(java.lang.Object obj)
Check whether the object type is valid. An object type is valid if it is either: aspectized, Serializable, or primitive type. Otherwise a runtime exception is thrown.

Parameters:
obj -

constructFqn

public static Fqn constructFqn(Fqn baseFqn,
                               java.lang.Object relative)


Copyright 1998-2005 JBoss Inc . All Rights Reserved.