/** * Creates a new complete constructor {@code AInterfaceDeclIR} node with the given nodes as children. * @deprecated This method should not be used, use AstFactory instead. * The basic child nodes are removed from their previous parents. * @param templateTypes_ the {@link NodeList} node for the {@code templateTypes} child of this {@link AInterfaceDeclIR} node * @param extension_ the {@link NodeList} node for the {@code extension} child of this {@link AInterfaceDeclIR} node * @param package_ the {@link String} node for the {@code package} child of this {@link AInterfaceDeclIR} node * @param name_ the {@link String} node for the {@code name} child of this {@link AInterfaceDeclIR} node * @param fields_ the {@link NodeList} node for the {@code fields} child of this {@link AInterfaceDeclIR} node * @param methodSignatures_ the {@link NodeList} node for the {@code methodSignatures} child of this {@link AInterfaceDeclIR} node */ public AInterfaceDeclIR(SourceNode sourceNode_, Object tag_, List<? extends ClonableString> metaData_, List<? extends ATemplateTypeIR> templateTypes_, List<? extends ATokenNameIR> extension_, String package_, String name_, List<? extends AFieldDeclIR> fields_, List<? extends AMethodDeclIR> methodSignatures_) { super(sourceNode_,tag_,metaData_); this.setTemplateTypes(templateTypes_); this.setExtension(extension_); this.setPackage(package_); this.setName(name_); this.setFields(fields_); this.setMethodSignatures(methodSignatures_); }
/** * Creates a new tree field only constructor {@code AInterfaceDeclIR TAG=interface} node with the given nodes as children. * @deprecated This method should not be used, use AstFactory instead. * The basic child nodes are removed from their previous parents. * @param templateTypes_ the {@link NodeList} node for the {@code templateTypes} child of this {@link AInterfaceDeclIR} node * @param extension_ the {@link NodeList} node for the {@code extension} child of this {@link AInterfaceDeclIR} node * @param package_ the {@link String} node for the {@code package} child of this {@link AInterfaceDeclIR} node * @param name_ the {@link String} node for the {@code name} child of this {@link AInterfaceDeclIR} node * @param fields_ the {@link NodeList} node for the {@code fields} child of this {@link AInterfaceDeclIR} node * @param methodSignatures_ the {@link NodeList} node for the {@code methodSignatures} child of this {@link AInterfaceDeclIR} node */ public AInterfaceDeclIR(List<? extends ATemplateTypeIR> templateTypes_, List<? extends ATokenNameIR> extension_, String package_, String name_, List<? extends AFieldDeclIR> fields_, List<? extends AMethodDeclIR> methodSignatures_) { super(null,null,null); this.setTemplateTypes(templateTypes_); this.setExtension(extension_); this.setPackage(package_); this.setName(name_); this.setFields(fields_); this.setMethodSignatures(methodSignatures_); }
private AInterfaceDeclIR convertToInterface(SClassDeclIR c) { List<AFieldDeclIR> clonedFields = new LinkedList<>(); for (AFieldDeclIR f : c.getFields()) { clonedFields.add(f.clone()); } List<AMethodDeclIR> clonedMethods = new LinkedList<>(); for (AMethodDeclIR m : c.getMethods()) { if (!m.getIsConstructor() && !(m.getTag() instanceof IRGeneratedTag)) { clonedMethods.add(m.clone()); } } AInterfaceDeclIR inter = new AInterfaceDeclIR(); inter.setFields(clonedFields); inter.setMetaData(c.getMetaData()); inter.setMethodSignatures(clonedMethods); inter.setName(c.getName()); inter.setPackage(c.getPackage()); inter.setSourceNode(c.getSourceNode()); inter.setTag(c.getTag()); for (ATokenNameIR n : c.getSuperNames()) { inter.getExtension().add(n.clone()); } return inter; }
methodTypeInterface.setName(transformationAssistant.getInfo().getTempVarNameGen().nextVarName(funcValPrefixes.funcInterface()));
recInterface.setName(RECORD_NAME); AExternalTypeIR recInterfaceType = new AExternalTypeIR(); recInterfaceType.setName(RECORD_NAME);
interf.setName(concPrefixes.evalPpTypeName());