org.skyscreamer.yoga.metadata
Class DefaultMetaDataRegistry
java.lang.Object
org.skyscreamer.yoga.metadata.DefaultMetaDataRegistry
- All Implemented Interfaces:
- MetaDataRegistry
public class DefaultMetaDataRegistry
- extends Object
- implements MetaDataRegistry
|
Method Summary |
protected void |
addCoreFields(Class<?> type,
String suffix,
TypeMetaData result)
|
protected void |
addHref(PropertyMetaData propertyMetaData,
Class<?> propertyType,
String suffix)
|
protected Class<?> |
getCollectionType(Method readMethod,
Class<?> propertyType)
|
CoreSelector |
getCoreSelector()
|
TypeMetaData |
getMetaData(Class<?> type,
String suffix)
|
TypeMetaData |
getMetaData(String name,
String suffix)
|
String |
getMetadataHref(Class<?> propertyType,
String suffix)
|
String |
getNameForType(Class<?> type)
given a type, get a name. |
String |
getRootMetaDataUrl()
|
Class<?> |
getTypeForName(String name)
|
Collection<String> |
getTypes()
|
void |
setCoreSelector(CoreSelector coreSelector)
|
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 |
DefaultMetaDataRegistry
public DefaultMetaDataRegistry()
setCoreSelector
public void setCoreSelector(CoreSelector coreSelector)
getCoreSelector
public CoreSelector getCoreSelector()
getRootMetaDataUrl
public String getRootMetaDataUrl()
setRootMetaDataUrl
public void setRootMetaDataUrl(String rootMetaDataUrl)
setTypeMappings
public void setTypeMappings(Map<String,Class<?>> map)
getTypes
public Collection<String> getTypes()
- Specified by:
getTypes in interface MetaDataRegistry
getTypeForName
public Class<?> getTypeForName(String name)
- Specified by:
getTypeForName in interface MetaDataRegistry
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 MetaDataRegistry
getMetaData
public TypeMetaData getMetaData(String name,
String suffix)
- Specified by:
getMetaData in interface MetaDataRegistry
getMetaData
public TypeMetaData getMetaData(Class<?> type,
String suffix)
- Specified by:
getMetaData in interface MetaDataRegistry
addCoreFields
protected void addCoreFields(Class<?> type,
String suffix,
TypeMetaData result)
getCollectionType
protected Class<?> getCollectionType(Method readMethod,
Class<?> propertyType)
getMetadataHref
public String getMetadataHref(Class<?> propertyType,
String suffix)
- Specified by:
getMetadataHref in interface MetaDataRegistry
addHref
protected void addHref(PropertyMetaData propertyMetaData,
Class<?> propertyType,
String suffix)
Copyright © 2012. All Rights Reserved.