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 java.lang.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 java.util.Map<java.lang.String,PropertyTypeDescriptor> propertyTypes
          Property types already resolved.
protected static java.util.Map<java.lang.Class<?>,TypeDescriptor> types
          Descriptors for types.
 
Fields inherited from interface info.magnolia.content2bean.TypeMapping
MAP_TYPE
 
Constructor Summary
TypeMappingImpl()
           
 
Method Summary
 void addPropertyTypeDescriptor(java.lang.Class<?> beanClass, java.lang.String propName, PropertyTypeDescriptor dscr)
           
 void addTypeDescriptor(java.lang.Class<?> beanClass, TypeDescriptor dscr)
           
 java.lang.reflect.Method getAddMethod(java.lang.Class<?> type, java.lang.String name, int numberOfParameters)
          Get a adder method.
protected  java.lang.reflect.Method getExactMethod(java.lang.Class<?> type, java.lang.String name, int numberOfParameters)
          Find a method.
 PropertyTypeDescriptor getPropertyTypeDescriptor(java.lang.Class<?> beanClass, java.lang.String propName)
          Cache the already resolved types.
 TypeDescriptor getTypeDescriptor(java.lang.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 java.util.Map<java.lang.String,PropertyTypeDescriptor> propertyTypes
Property types already resolved.


types

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

Constructor Detail

TypeMappingImpl

public TypeMappingImpl()
Method Detail

getAddMethod

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


getPropertyTypeDescriptor

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

Specified by:
getPropertyTypeDescriptor in interface TypeMapping

addPropertyTypeDescriptor

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

addTypeDescriptor

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

getTypeDescriptor

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

getExactMethod

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

Parameters:
numberOfParameters -


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