/** * Creates a new tree field only constructor {@code ATemplateTypeIR TAG=template} 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 name_ the {@link String} node for the {@code name} child of this {@link ATemplateTypeIR} node */ public ATemplateTypeIR(Boolean optional_, ANamedTypeDeclIR namedInvType_, String name_) { super(null,null,null,optional_,namedInvType_); this.setName(name_); }
/** * Creates a new complete constructor {@code ATemplateTypeIR} 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 name_ the {@link String} node for the {@code name} child of this {@link ATemplateTypeIR} node */ public ATemplateTypeIR(SourceNode sourceNode_, Object tag_, List<? extends ClonableString> metaData_, Boolean optional_, ANamedTypeDeclIR namedInvType_, String name_) { super(sourceNode_,tag_,metaData_,optional_,namedInvType_); this.setName(name_); }
@Override public STypeIR caseAParameterType(AParameterType node, IRInfo question) throws AnalysisException { String name = node.getName().getName(); ATemplateTypeIR templateType = new ATemplateTypeIR(); templateType.setName(name); return templateType; }
public AApplyExpIR consUtilCopyCall() { ATemplateTypeIR copyType = new ATemplateTypeIR(); copyType.setName("T"); AApplyExpIR copyCall = consUtilCall(copyType, COPY); SExpIR member = copyCall.getRoot(); if (member instanceof AExplicitVarExpIR && ((AExplicitVarExpIR) member).getType() instanceof AMethodTypeIR) { AMethodTypeIR methodType = (AMethodTypeIR) member.getType(); methodType.getParams().add(member.getType().clone()); } else { log.error("Expected type of call expression to be a method type at this point. Got: " + copyCall.getType()); } return copyCall; }
templateType.setName(typeParam.getName()); method.getTemplateTypes().add(templateType);
templateType.setName(typeParam.getName()); func.getTemplateTypes().add(templateType);