/** Add an implemented type. * @param type the qualified name of the implemented type. */ public void addImplements(String type) { if (!Strings.isEmpty(type)) { this.sarlClass.getImplements().add(newTypeRef(this.container, type)); } }
/** Check if implemented interfaces of a Xtend Class are redundant. * * @param xtendClass the class. */ @Check public void checkRedundantImplementedInterfaces(SarlClass xtendClass) { checkRedundantInterfaces( xtendClass, XTEND_CLASS__IMPLEMENTS, xtendClass.getImplements(), Utils.singletonList(xtendClass.getExtends())); }
/** Generate the given object. * * @param clazz the class. * @param it the target for the generated content. * @param context the context. */ protected void _generate(SarlClass clazz, PyAppendable it, IExtraLanguageGeneratorContext context) { generateTypeDeclaration( this.qualifiedNameProvider.getFullyQualifiedName(clazz).toString(), clazz.getName(), clazz.isAbstract(), getSuperTypes(clazz.getExtends(), clazz.getImplements()), getTypeBuilder().getDocumentation(clazz), true, clazz.getMembers(), it, context, null); }
/** Generate the given object. * * @param clazz the class. * @param context the context. */ protected void _generate(SarlClass clazz, IExtraLanguageGeneratorContext context) { final JvmDeclaredType jvmType = getJvmModelAssociations().getInferredType(clazz); final PyAppendable appendable = createAppendable(jvmType, context); if (generateTypeDeclaration( this.qualifiedNameProvider.getFullyQualifiedName(clazz).toString(), clazz.getName(), clazz.isAbstract(), getSuperTypes(clazz.getExtends(), clazz.getImplements()), getTypeBuilder().getDocumentation(clazz), true, clazz.getMembers(), appendable, context, null)) { final QualifiedName name = getQualifiedNameProvider().getFullyQualifiedName(clazz); writeFile(name, appendable, context); } }