Log log = getLog();
if (log.isTraceEnabled())
log.trace(_loc.get("parse-class", _cls.getName()));
MetaDataRepository repos = getRepository();
ClassMetaData meta = repos.getCachedMetaData(_cls);
if (meta != null
&& ((isMetaDataMode() && (meta.getSourceMode() & MODE_META) != 0)
|| (isMappingMode() && (meta.getSourceMode() & MODE_MAPPING) != 0)))
{
if (log.isWarnEnabled())
log.warn(_loc.get("dup-metadata", _cls, getSourceName()));
_cls = null;
return false;
}
// if we don't know the access type, check to see if a superclass
// has already defined the access type
int defaultAccess = _access;
if (defaultAccess == ClassMetaData.ACCESS_UNKNOWN) {
ClassMetaData sup = repos.getCachedMetaData(_cls.getSuperclass());
if (sup != null)
defaultAccess = sup.getAccessType();
}
if (meta == null) {
// add metadata for this type
int access = toAccessType(attrs.getValue("access"), defaultAccess);
meta = repos.addMetaData(_cls, access);
meta.setEnvClassLoader(_envLoader);
meta.setSourceMode(MODE_NONE);
// parse annotations first so XML overrides them
if (_parser != null &&