// find / create metadata
ClassMetaData meta = getMetaData();
if (meta == null)
return null;
Entity entity = (Entity) _cls.getAnnotation(Entity.class);
MappedSuperclass mapped = (MappedSuperclass)
_cls.getAnnotation(MappedSuperclass.class);
if (isMetaDataMode()) {
meta.setAbstract(mapped != null);
// while the spec only provides for embedded exclusive, it doesn't
// seem hard to support otherwise
if (entity == null)
meta.setEmbeddedOnly(true);
else {
meta.setEmbeddedOnly(false);
if (!StringUtils.isEmpty(entity.name()))
meta.setTypeAlias(entity.name());
}
}
// track fetch groups to parse them after fields, since they
// rely on field metadata