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(isDuplicateClass(meta)) {
if (log.isWarnEnabled()) {
log.warn(_loc.get("dup-metadata", _cls, getSourceName()));
}
if(log.isTraceEnabled()) {
log.trace(String.format(
"MetaData originally obtained from source: %s under mode: %d with scope: %s, and type: %d",
meta.getSourceName(), meta.getSourceMode(), meta.getSourceScope(), meta.getSourceType()));
}
}
_cls = null;
return false;
}
int access = AccessCode.UNKNOWN;
if (meta == null) {
int accessCode = toAccessType(attrs.getValue("access"));
// if access not specified and access was specified at
// the system level, use the system default (which may
// be UNKNOWN)
if (accessCode == AccessCode.UNKNOWN)
accessCode = _access;
meta = repos.addMetaData(_cls, accessCode, metaDataComplete);
FieldMetaData[] fmds = meta.getFields();
if (metaDataComplete) {
for (int i = 0; i < fmds.length; i++) {
fmds[i].setExplicit(true);
}