info.magnolia.content2bean.impl
Class TypeMappingImpl

java.lang.Object
  extended by info.magnolia.content2bean.impl.TypeMappingImpl
All Implemented Interfaces:
TypeMapping
Direct Known Subclasses:
DescriptorFileBasedTypeMapping, PropertiesBasedTypeMapping

@Singleton
public class TypeMappingImpl
extends Object
implements TypeMapping

Basic type mapping implementation.

Version:
$Id$
Author:
philipp

Nested Class Summary
 
Nested classes/interfaces inherited from interface info.magnolia.content2bean.TypeMapping
TypeMapping.Factory
 
Field Summary
 
Fields inherited from interface info.magnolia.content2bean.TypeMapping
MAP_TYPE
 
Constructor Summary
TypeMappingImpl()
           
 
Method Summary
 void addPropertyTypeDescriptor(Class<?> beanClass, String propName, PropertyTypeDescriptor dscr)
           
 void addTypeDescriptor(Class<?> beanClass, TypeDescriptor dscr)
           
protected  Content2BeanTransformer findTransformerByNamingConvention(Class<?> beanClass)
          Deprecated. since 4.5, transformers should be explicitly registered via the module descriptor.
protected  Content2BeanTransformer findTransformerViaProperty(Class<?> beanClass)
          Deprecated. since 4.5, transformers should be explicitly registered via the module descriptor.
 Method getAddMethod(Class<?> type, String name, int numberOfParameters)
          Get a adder method.
protected  Method getExactMethod(Class<?> type, String name, int numberOfParameters)
          Find a method.
 PropertyTypeDescriptor getPropertyTypeDescriptor(Class<?> beanClass, String propName)
          Cache the already resolved types.
 TypeDescriptor getTypeDescriptor(Class<?> beanClass)
           
protected  Content2BeanTransformer instantiateTransformer(Class<?> beanClass, String transformerClassName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeMappingImpl

public TypeMappingImpl()
Method Detail

getAddMethod

public Method getAddMethod(Class<?> type,
                           String name,
                           int numberOfParameters)
Get a adder method. Transforms name to singular.


getPropertyTypeDescriptor

public PropertyTypeDescriptor getPropertyTypeDescriptor(Class<?> beanClass,
                                                        String propName)
Cache the already resolved types.

Specified by:
getPropertyTypeDescriptor in interface TypeMapping

addPropertyTypeDescriptor

public void addPropertyTypeDescriptor(Class<?> beanClass,
                                      String propName,
                                      PropertyTypeDescriptor dscr)
Specified by:
addPropertyTypeDescriptor in interface TypeMapping

addTypeDescriptor

public void addTypeDescriptor(Class<?> beanClass,
                              TypeDescriptor dscr)
Specified by:
addTypeDescriptor in interface TypeMapping

getTypeDescriptor

public TypeDescriptor getTypeDescriptor(Class<?> beanClass)
Specified by:
getTypeDescriptor in interface TypeMapping

findTransformerByNamingConvention

protected Content2BeanTransformer findTransformerByNamingConvention(Class<?> beanClass)
Deprecated. since 4.5, transformers should be explicitly registered via the module descriptor.


findTransformerViaProperty

protected Content2BeanTransformer findTransformerViaProperty(Class<?> beanClass)
                                                      throws ClassNotFoundException
Deprecated. since 4.5, transformers should be explicitly registered via the module descriptor.

This was originally implemented by PropertiesBasedTypeMapping.

Throws:
ClassNotFoundException

instantiateTransformer

protected Content2BeanTransformer instantiateTransformer(Class<?> beanClass,
                                                         String transformerClassName)
                                                  throws ClassNotFoundException
Throws:
ClassNotFoundException

getExactMethod

protected Method getExactMethod(Class<?> type,
                                String name,
                                int numberOfParameters)
Find a method.

Parameters:
numberOfParameters -


Copyright © 2003-2012 Magnolia International Ltd.. All Rights Reserved.