net.sf.cglib.proxy

Class CallbackHelper

Implemented Interfaces:
CallbackFilter

public abstract class CallbackHelper
extends java.lang.Object
implements CallbackFilter

Version:
$Id: CallbackHelper.java,v 1.2 2004/06/24 21:15:20 herbyderby Exp $

Constructor Summary

CallbackHelper(Class superclass, Class[] interfaces)

Method Summary

int
accept(Method method)
Map a method to a callback.
boolean
equals(Object o)
The CallbackFilter in use affects which cached class the Enhancer will use, so this is a reminder that you should correctly implement equals and hashCode for custom CallbackFilter implementations in order to improve performance.
Class[]
getCallbackTypes()
Callback[]
getCallbacks()
int
hashCode()

Constructor Details

CallbackHelper

public CallbackHelper(Class superclass,
                      Class[] interfaces)

Method Details

accept

public int accept(Method method)
Map a method to a callback.
Specified by:
accept in interface CallbackFilter
Parameters:
method - the intercepted method
Returns:
the index into the array of callbacks (as specified by Enhancer.setCallbacks(Callback[])) to use for the method,

equals

public boolean equals(Object o)
The CallbackFilter in use affects which cached class the Enhancer will use, so this is a reminder that you should correctly implement equals and hashCode for custom CallbackFilter implementations in order to improve performance.
Specified by:
equals in interface CallbackFilter

getCallbackTypes

public Class[] getCallbackTypes()

getCallbacks

public Callback[] getCallbacks()

hashCode

public int hashCode()

Copyright (c) 2001 - Apache Software Foundation