if (def == null) {
throw new DefinitionNotFoundException(extended, getLocation());
}
if (extended.equals(descriptor)) {
throw new InvalidDefinitionException(String.format("%s cannot extend itself", getDescriptor()),
getLocation());
}
registry.assertAccess(descriptor, def);
}