/** * Creates a new complete constructor {@code AInterfaceTypeIR} 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 types_ the {@link NodeList} node for the {@code types} child of this {@link AInterfaceTypeIR} node * @param name_ the {@link String} node for the {@code name} child of this {@link AInterfaceTypeIR} node */ public AInterfaceTypeIR(SourceNode sourceNode_, Object tag_, List<? extends ClonableString> metaData_, Boolean optional_, ANamedTypeDeclIR namedInvType_, List<? extends STypeIR> types_, String name_) { super(sourceNode_,tag_,metaData_,optional_,namedInvType_); this.setTypes(types_); this.setName(name_); }
/** * Creates a new tree field only constructor {@code AInterfaceTypeIR 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 types_ the {@link NodeList} node for the {@code types} child of this {@link AInterfaceTypeIR} node * @param name_ the {@link String} node for the {@code name} child of this {@link AInterfaceTypeIR} node */ public AInterfaceTypeIR(Boolean optional_, ANamedTypeDeclIR namedInvType_, List<? extends STypeIR> types_, String name_) { super(null,null,null,optional_,namedInvType_); this.setTypes(types_); this.setName(name_); }
public String format(AMethodTypeIR methodType) throws AnalysisException { final String OBJ = "Object"; if (funcValAssist == null) { return OBJ; } AInterfaceDeclIR methodTypeInterface = funcValAssist.findInterface(methodType); if (methodTypeInterface == null) { return OBJ; // Should not happen } AInterfaceTypeIR methodClass = new AInterfaceTypeIR(); methodClass.setName(methodTypeInterface.getName()); LinkedList<STypeIR> params = methodType.getParams(); for (STypeIR param : params) { methodClass.getTypes().add(param.clone()); } methodClass.getTypes().add(methodType.getResult().clone()); return methodClass != null ? format(methodClass) : OBJ; }
classType.setName(lambdaInterface.getName());