net.sf.cglib
Interface Callbacks

All Known Implementing Classes:
SimpleCallbacks

public interface Callbacks

Provides a method to map from callback types (as defined per-method by a CallbackFilter) to a particular Callback implementation. The callback type constants are defined here as well. In practice it should be rare to need to implement this interface. See SimpleCallbacks for a simple implementation.


Field Summary
static int DISPATCH
          Callback type used to load an implementation for every single method invocation.
static int INTERCEPT
          Generic interceptor callback type.
static int JDK_PROXY
          Special callback type used by the Proxy class for java.lang.reflect.Proxy compatibility.
static int LAZY_LOAD
          Callback type used to load an implementation as soon as the first method is called, Callback implementation is LazyLoader.
static int MAX_VALUE
           
static int NO_OP
          No-op callback type.
 
Method Summary
 Callback get(int type)
          Return the actual Callback implementation for the specified callback type.
 

Field Detail

NO_OP

public static final int NO_OP
No-op callback type. Does not generate an intercepted method in the subclass--the "super" method will be called directly instead. No associated Callback implementation.

See Also:
Constant Field Values

INTERCEPT

public static final int INTERCEPT
Generic interceptor callback type. Callback implementation is MethodInterceptor.

See Also:
MethodInterceptor, Constant Field Values

JDK_PROXY

public static final int JDK_PROXY
Special callback type used by the Proxy class for java.lang.reflect.Proxy compatibility. You probably don't want to use this directly. Callback implementation is InvocationHandler.

See Also:
Proxy, InvocationHandler, Constant Field Values

LAZY_LOAD

public static final int LAZY_LOAD
Callback type used to load an implementation as soon as the first method is called, Callback implementation is LazyLoader.

See Also:
LazyLoader, Constant Field Values

DISPATCH

public static final int DISPATCH
Callback type used to load an implementation for every single method invocation. Callback implementation is Dispatcher.

See Also:
Dispatcher, Constant Field Values

MAX_VALUE

public static final int MAX_VALUE
See Also:
Constant Field Values
Method Detail

get

public Callback get(int type)
Return the actual Callback implementation for the specified callback type.

Parameters:
type - the callback type
Returns:
the callback implementation


Copyright © 2002-2003 cglib. All Rights Reserved.