Top Description Methods
org.springframework.cglib.proxy

public Interface Factory

Annotations
@SuppressWarnings:rawtypes, unchecked

All enhanced instances returned by the Enhancer class implement this interface. Using this interface for new instances is faster than going through the Enhancer interface or using reflection. In addition, to intercept methods called during object construction you must use these methods instead of reflection.
Author
Juozas Baliuka [email protected]
Version
$Id: Factory.java,v 1.13 2004/06/24 21:15:20 herbyderby Exp $

Method Summary

Modifier and TypeMethod and Description
public Callback

Returns:

the callback implementation
getCallback
(int
the callback index
index
)

Return the Callback implementation at the specified index.

public Callback[]

Returns:

a new array instance
getCallbacks
()

Get the current set of callbacks for ths object.

public Object

Returns:

new instance of the same type
newInstance
(Callback
the new interceptor to use
callback
)

Creates new instance of the same type, using the no-arg constructor.

public Object

Returns:

new instance of the same type
newInstance
(Callback[]
the new callbacks(s) to use
callbacks
)

Creates new instance of the same type, using the no-arg constructor.

public Object

Returns:

new instance of the same type
newInstance
(Class<T>[]
the constructor argument types
types
,
Object[]
the constructor arguments
args
,
Callback[]
the new interceptor(s) to use
callbacks
)

Creates a new instance of the same type, using the constructor matching the given signature.

public void
setCallback(int
the callback index to replace
index
,
Callback
the new callback
callback
)

Set the callback for this object for the given type.

public void
setCallbacks(Callback[]
the new callbacks(s) to use
callbacks
)

Replace all of the callbacks for this object at once.

Method Detail

getCallbackback to summary
public Callback getCallback(int index)

Return the Callback implementation at the specified index.

Parameters
index:int

the callback index

Returns:Callback

the callback implementation

getCallbacksback to summary
public Callback[] getCallbacks()

Get the current set of callbacks for ths object.

Returns:Callback[]

a new array instance

newInstanceback to summary
public Object newInstance(Callback callback)

Creates new instance of the same type, using the no-arg constructor. The class of this object must have been created using a single Callback type. If multiple callbacks are required an exception will be thrown.

Parameters
callback:Callback

the new interceptor to use

Returns:Object

new instance of the same type

newInstanceback to summary
public Object newInstance(Callback[] callbacks)

Creates new instance of the same type, using the no-arg constructor.

Parameters
callbacks:Callback[]

the new callbacks(s) to use

Returns:Object

new instance of the same type

newInstanceback to summary
public Object newInstance(Class<T>[] types, Object[] args, Callback[] callbacks)

Creates a new instance of the same type, using the constructor matching the given signature.

Parameters
types:Class<T>[]

the constructor argument types

args:Object[]

the constructor arguments

callbacks:Callback[]

the new interceptor(s) to use

Returns:Object

new instance of the same type

setCallbackback to summary
public void setCallback(int index, Callback callback)

Set the callback for this object for the given type.

Parameters
index:int

the callback index to replace

callback:Callback

the new callback

setCallbacksback to summary
public void setCallbacks(Callback[] callbacks)

Replace all of the callbacks for this object at once.

Parameters
callbacks:Callback[]

the new callbacks(s) to use