/** Add the super type. * @param superType the qualified name of the super type. */ public void addExtends(String superType) { if (!Strings.isEmpty(superType)) { JvmParameterizedTypeReference superTypeRef = newTypeRef(this.container, superType); this.sarlInterface.getExtends().add(superTypeRef); return; } }
/** Check if implemented interfaces of a Xtend Interface are redundant. * * @param xtendInterface the interface. */ @Check public void checkRedundantImplementedInterfaces(SarlInterface xtendInterface) { checkRedundantInterfaces( xtendInterface, XTEND_INTERFACE__EXTENDS, xtendInterface.getExtends(), Collections.<JvmTypeReference>emptyList()); }
/** Generate the given object. * * @param interf the interface. * @param it the target for the generated content. * @param context the context. */ protected void _generate(SarlInterface interf, PyAppendable it, IExtraLanguageGeneratorContext context) { generateTypeDeclaration( this.qualifiedNameProvider.getFullyQualifiedName(interf).toString(), interf.getName(), true, interf.getExtends(), getTypeBuilder().getDocumentation(interf), true, interf.getMembers(), it, context, null); }
/** Generate the given object. * * @param interf the interface. * @param context the context. */ protected void _generate(SarlInterface interf, IExtraLanguageGeneratorContext context) { final JvmDeclaredType jvmType = getJvmModelAssociations().getInferredType(interf); final PyAppendable appendable = createAppendable(jvmType, context); if (generateTypeDeclaration( this.qualifiedNameProvider.getFullyQualifiedName(interf).toString(), interf.getName(), true, interf.getExtends(), getTypeBuilder().getDocumentation(interf), true, interf.getMembers(), appendable, context, null)) { final QualifiedName name = getQualifiedNameProvider().getFullyQualifiedName(interf); writeFile(name, appendable, context); } }