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

public class TypeMappingImpl
extends Object
implements TypeMapping

Basic type mapping implementation.

Version:
$Id: TypeMappingImpl.java 41137 2011-01-06 18:19:25Z gjoseph $
Author:
philipp

Nested Class Summary
 
Nested classes/interfaces inherited from interface info.magnolia.content2bean.TypeMapping
TypeMapping.Factory
 
Field Summary
protected static Map<String,PropertyTypeDescriptor> propertyTypes
          Property types already resolved.
protected static Map<Class<?>,TypeDescriptor> types
          Descriptors for types.
 
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)
           
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

propertyTypes

protected static Map<String,PropertyTypeDescriptor> propertyTypes
Property types already resolved.


types

protected static Map<Class<?>,TypeDescriptor> types
Descriptors for types.

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

getExactMethod

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

Parameters:
numberOfParameters -


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