org.skyscreamer.yoga.metadata
Class MapMetaDataServiceImpl

java.lang.Object
  extended by org.skyscreamer.yoga.metadata.MapMetaDataServiceImpl
All Implemented Interfaces:
MetaDataService

public class MapMetaDataServiceImpl
extends Object
implements MetaDataService


Constructor Summary
MapMetaDataServiceImpl()
           
 
Method Summary
protected  void addCoreFields(Class<?> type, String suffix, TypeMetaData result)
           
protected  PropertyMetaData addField(String suffix, TypeMetaData result, Method readMethod, String name, boolean core)
           
protected  void addHref(PropertyMetaData propertyMetaData, Class<?> propertyType, String suffix)
           
protected  void addPopulatorFields(Class<?> type, String suffix, TypeMetaData result)
           
protected  Class<?> getCollectionType(Method readMethod, Class<?> propertyType)
           
 FieldPopulatorRegistry getFieldPopulatorRegistry()
           
 String getHref(Class<?> propertyType, String suffix)
           
 TypeMetaData getMetaData(Class<?> type, String suffix)
           
 TypeMetaData getMetaData(String name, String suffix)
           
 String getNameForType(Class<?> type)
          given a type, get a name.
 String getRootMetaDataUrl()
           
 Class<?> getTypeForName(String name)
           
 Map<String,Class<?>> getTypeMappings()
           
 void setFieldPopulatorRegistry(FieldPopulatorRegistry fieldPopulatorRegistry)
           
 void setRootMetaDataUrl(String rootMetaDataUrl)
           
 void setTypeMappings(Map<String,Class<?>> map)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapMetaDataServiceImpl

public MapMetaDataServiceImpl()
Method Detail

getFieldPopulatorRegistry

public FieldPopulatorRegistry getFieldPopulatorRegistry()

setFieldPopulatorRegistry

public void setFieldPopulatorRegistry(FieldPopulatorRegistry fieldPopulatorRegistry)

getRootMetaDataUrl

public String getRootMetaDataUrl()

setRootMetaDataUrl

public void setRootMetaDataUrl(String rootMetaDataUrl)

setTypeMappings

public void setTypeMappings(Map<String,Class<?>> map)

getTypeMappings

public Map<String,Class<?>> getTypeMappings()
Specified by:
getTypeMappings in interface MetaDataService

getTypeForName

public Class<?> getTypeForName(String name)
Specified by:
getTypeForName in interface MetaDataService

getNameForType

public String getNameForType(Class<?> type)
given a type, get a name. This takes subclassing into consideration. For now, this will return the first subclass match to the type, not the closest

Specified by:
getNameForType in interface MetaDataService

getMetaData

public TypeMetaData getMetaData(String name,
                                String suffix)
Specified by:
getMetaData in interface MetaDataService

getMetaData

public TypeMetaData getMetaData(Class<?> type,
                                String suffix)
Specified by:
getMetaData in interface MetaDataService

addCoreFields

protected void addCoreFields(Class<?> type,
                             String suffix,
                             TypeMetaData result)

addPopulatorFields

protected void addPopulatorFields(Class<?> type,
                                  String suffix,
                                  TypeMetaData result)

addField

protected PropertyMetaData addField(String suffix,
                                    TypeMetaData result,
                                    Method readMethod,
                                    String name,
                                    boolean core)

getCollectionType

protected Class<?> getCollectionType(Method readMethod,
                                     Class<?> propertyType)

getHref

public String getHref(Class<?> propertyType,
                      String suffix)
Specified by:
getHref in interface MetaDataService

addHref

protected void addHref(PropertyMetaData propertyMetaData,
                       Class<?> propertyType,
                       String suffix)


Copyright © 2011. All Rights Reserved.