org.omnaest.utils.beans.adapter
Class SourcePropertyAccessorToTypeAdapter<T>

java.lang.Object
  extended by org.omnaest.utils.beans.adapter.SourcePropertyAccessorToTypeAdapter<T>
All Implemented Interfaces:
Serializable

public class SourcePropertyAccessorToTypeAdapter<T>
extends Object
implements Serializable

The SourcePropertyAccessorToTypeAdapter will provide an adapter from a SourcePropertyAccessor to any given Class type.

Author:
Omnaest
See Also:
SourcePropertyAccessorToTypeAdapter.Configuration, Serialized Form

Nested Class Summary
static interface SourcePropertyAccessorToTypeAdapter.Builder<T>
          SourcePropertyAccessorToTypeAdapter.Builder for multiple instances based on the same Class type and SourcePropertyAccessorToTypeAdapter.Configuration instance.
static class SourcePropertyAccessorToTypeAdapter.Configuration
          The SourcePropertyAccessorToTypeAdapter.Configuration of a SourcePropertyAccessorToTypeAdapter includes following settings:

SourcePropertyAccessorToTypeAdapter.Configuration.setPropertyAccessOption(PropertyAccessOption) SourcePropertyAccessorToTypeAdapter.Configuration.setRegardingAdapterAnnotation(boolean) SourcePropertyAccessorToTypeAdapter.Configuration.setRegardedAnnotationScope(RegardedAnnotationScope) SourcePropertyAccessorToTypeAdapter.Configuration.setRegardingDefaultValueAnnotation(boolean)

If SourcePropertyAccessorToTypeAdapter.Configuration.setPropertyAccessOption(PropertyAccessOption) is set to another PropertyAccessOption it is possible to access the underlying Map keys e.g. with lowercased keys instead of the case sensitive property names.
 
Constructor Summary
protected SourcePropertyAccessorToTypeAdapter(Class<T> type, SourcePropertyAccessorToTypeAdapter.Configuration configuration)
           
 
Method Summary
static
<T> SourcePropertyAccessorToTypeAdapter.Builder<T>
builder(Class<T> type, SourcePropertyAccessorToTypeAdapter.Configuration configuration)
          Creates a new SourcePropertyAccessorToTypeAdapter.Builder instance which allows to create multiple adapter instances much faster.
static
<T> T
newInstance(Class<T> type, SourcePropertyAccessor sourcePropertyAccessor)
          Creates a new SourcePropertyAccessorToTypeAdapter instance for the given Class based on the given SourcePropertyAccessor
static
<T> T
newInstance(Class<T> type, SourcePropertyAccessor sourcePropertyAccessor, SourcePropertyAccessorToTypeAdapter.Configuration configuration)
          Creates a new SourcePropertyAccessorToTypeAdapter instance for the given Class based on the given SourcePropertyAccessor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SourcePropertyAccessorToTypeAdapter

protected SourcePropertyAccessorToTypeAdapter(Class<T> type,
                                              SourcePropertyAccessorToTypeAdapter.Configuration configuration)
Parameters:
type -
configuration -
See Also:
newInstance(Class, SourcePropertyAccessor, Configuration)
Method Detail

newInstance

public static <T> T newInstance(Class<T> type,
                                SourcePropertyAccessor sourcePropertyAccessor)
Creates a new SourcePropertyAccessorToTypeAdapter instance for the given Class based on the given SourcePropertyAccessor

Parameters:
type -
sourcePropertyAccessor -
Returns:

newInstance

public static <T> T newInstance(Class<T> type,
                                SourcePropertyAccessor sourcePropertyAccessor,
                                SourcePropertyAccessorToTypeAdapter.Configuration configuration)
Creates a new SourcePropertyAccessorToTypeAdapter instance for the given Class based on the given SourcePropertyAccessor

Parameters:
type -
sourcePropertyAccessor -
configuration -
Returns:
See Also:
SourcePropertyAccessorToTypeAdapter.Configuration

builder

public static <T> SourcePropertyAccessorToTypeAdapter.Builder<T> builder(Class<T> type,
                                                                         SourcePropertyAccessorToTypeAdapter.Configuration configuration)
Creates a new SourcePropertyAccessorToTypeAdapter.Builder instance which allows to create multiple adapter instances much faster.

Parameters:
type - Class
configuration - SourcePropertyAccessorToTypeAdapter.Configuration
Returns:
SourcePropertyAccessorToTypeAdapter.Builder
See Also:
newInstance(Class, SourcePropertyAccessor, Configuration)


Copyright © 2013. All Rights Reserved.