boolean useTypeFactory, Map<String, String> propertyMetaMappings, MetaMapper[] mapperReturn)
{
MetaType returnType = null;
// First look for meta mappings
MetaMapper<?> metaMapper = null;
MetaMapping metaMapping = getAnnotation(MetaMapping.class, info, metaData);
MetaMappingFactory metaMappingFactory = getAnnotation(MetaMappingFactory.class, info, metaData);
if(metaMappingFactory != null)
{
Class<? extends MetaMapperFactory<?>> mmfClass = metaMappingFactory.value();
try
{
MetaMapperFactory<?> mmf = mmfClass.newInstance();
String[] args = metaMappingFactory.args();
if(args.length > 0)
metaMapper = mmf.newInstance(args);
else
metaMapper = mmf.newInstance();
}
catch(Exception e)
{
log.debug("Failed to create MetaMapperFactory: "+metaMappingFactory, e);
}
}
if(metaMapping != null)
{
// Use the mapping for the type
Class<? extends MetaMapper<?>> mapperClass = metaMapping.value();
try
{
metaMapper = mapperClass.newInstance();
}
catch(Exception e)