/************************************************
 * Copyright (c) Shen Li. All rights reserved.  *
 * http://joyaop.sourceforge.net                *
 * -------------------------------------------- *
 * Distributable under LGPL license.            *
 * See terms of license at gnu.org.             *
 ************************************************/
package net.sf.joyaop.impl;

import net.sf.cglib.proxy.Callback;
import net.sf.joyaop.Joinpoint;

import java.lang.reflect.Modifier;

/**
 * @author Shen Li
 */
abstract class CallbackFactory {
    protected boolean needThreadLocalInvocation(Class clazz) {
        return (Joinpoint.class.isAssignableFrom(clazz) || Modifier.isAbstract(clazz.getModifiers()));
    }

    public abstract Callback getCallback(RuntimeAspectInstanceFactory factory);
}