/** * Returns a deep clone of this {@link AInMapMapType} node. * @return a deep clone of this {@link AInMapMapType} node */ public AInMapMapType clone() { return new AInMapMapType( _location, _resolved, _definitions, _from, _to, _empty ); }
/** * Creates a deep clone of this {@link AInMapMapType} node while putting all * old node-new node relations in the map {@code oldToNewMap}. * @param oldToNewMap the map filled with the old node-new node relation * @return a deep clone of this {@link AInMapMapType} node */ public AInMapMapType clone(Map<INode,INode> oldToNewMap) { AInMapMapType node = new AInMapMapType( _location, _resolved, _definitions, _from, _to, _empty ); oldToNewMap.put(this, node); return node; }
public static AInMapMapType newAInMapMapType(ILexLocation location, PType from, PType to) { AInMapMapType result = new AInMapMapType(); initType(result, location); result.setFrom(from); result.setTo(to); result.setEmpty(false); return result; }
/** * is_(exp, inmap expFromType to expToType) * * @param exp * @param ctxt * @param af * @throws AnalysisException */ public MapInverseObligation(AMapInverseUnaryExp exp, IPOContextStack ctxt, IPogAssistantFactory af) throws AnalysisException { super(exp, POType.MAP_INVERSE, ctxt, exp.getLocation(), af); AIsExp is_Exp = new AIsExp(); is_Exp.setTest(exp.getExp().clone()); AInMapMapType inMap_type = new AInMapMapType(); inMap_type.setFrom(exp.getMapType().getFrom().clone()); inMap_type.setTo(exp.getMapType().getTo().clone()); is_Exp.setBasicType(inMap_type); stitch = is_Exp; valuetree.setPredicate(ctxt.getPredWithContext(is_Exp)); }