protected void _generate(SarlAgent agent, IExtraLanguageGeneratorContext context) {
final JvmDeclaredType jvmType = getJvmModelAssociations().getInferredType(agent);
final PyAppendable appendable = createAppendable(jvmType, context);
final List<JvmTypeReference> superTypes;
if (agent.getExtends() != null) {
superTypes = Collections.singletonList(agent.getExtends());
} else {
superTypes = Collections.singletonList(getTypeReferences().getTypeForName(Agent.class, agent));
}
final String qualifiedName = this.qualifiedNameProvider.getFullyQualifiedName(agent).toString();
if (generateTypeDeclaration(
qualifiedName,
agent.getName(), agent.isAbstract(), superTypes,
getTypeBuilder().getDocumentation(agent),
true,
agent.getMembers(), appendable, context, (it, context2) -> {
generateGuardEvaluators(qualifiedName, it, context2);
})) {
final QualifiedName name = getQualifiedNameProvider().getFullyQualifiedName(agent);
writeFile(name, appendable, context);
}
}