org.omnaest.utils.beans.adapter
Interface SourcePropertyAccessorToTypeAdapter.Builder<T>

All Superinterfaces:
Serializable
Enclosing class:
SourcePropertyAccessorToTypeAdapter<T>

public static interface SourcePropertyAccessorToTypeAdapter.Builder<T>
extends Serializable

SourcePropertyAccessorToTypeAdapter.Builder for multiple instances based on the same Class type and SourcePropertyAccessorToTypeAdapter.Configuration instance.
This is much faster for many instances, since the Class has only to be generated once as prototype and can then be cloned to generate new instances.

It has to be ensured that any decorator given within the SourcePropertyAccessorToTypeAdapter.Configuration is stateless, since it might encounter concurrent access through different facade instances.

Author:
Omnaest

Method Summary
 T newTypeAdapter(SourcePropertyAccessor sourcePropertyAccessor)
          Creates the type adapter stub
 T newTypeAdapter(SourcePropertyAccessor sourcePropertyAccessor, SourcePropertyAccessorDecorator[] sourcePropertyAccessorDecorators, MethodInvocationHandlerDecorator[] methodInvocationHandlerDecorators)
          Similar to newTypeAdapter(SourcePropertyAccessor) but allows to add further SourcePropertyAccessorDecorator and MethodInvocationHandlerDecorator instances.
 

Method Detail

newTypeAdapter

T newTypeAdapter(SourcePropertyAccessor sourcePropertyAccessor)
Creates the type adapter stub

Parameters:
sourcePropertyAccessor - SourcePropertyAccessor
Returns:
new instance of type

newTypeAdapter

T newTypeAdapter(SourcePropertyAccessor sourcePropertyAccessor,
                 SourcePropertyAccessorDecorator[] sourcePropertyAccessorDecorators,
                 MethodInvocationHandlerDecorator[] methodInvocationHandlerDecorators)
Similar to newTypeAdapter(SourcePropertyAccessor) but allows to add further SourcePropertyAccessorDecorator and MethodInvocationHandlerDecorator instances.

Parameters:
sourcePropertyAccessor - SourcePropertyAccessor
sourcePropertyAccessorDecorators - SourcePropertyAccessorDecorator
methodInvocationHandlerDecorators - MethodInvocationHandlerDecorator
Returns:
new instance of type


Copyright © 2013. All Rights Reserved.