/** * Returns a deep clone of this {@link APatternTypePair} node. * @return a deep clone of this {@link APatternTypePair} node */ public APatternTypePair clone() { return new APatternTypePair( _resolved, cloneNode(_pattern), _type ); }
/** * Creates a deep clone of this {@link APatternTypePair} 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 APatternTypePair} node */ public APatternTypePair clone(Map<INode,INode> oldToNewMap) { APatternTypePair node = new APatternTypePair( _resolved, cloneNode(_pattern, oldToNewMap), _type ); oldToNewMap.put(this, node); return node; }
public static APatternTypePair newAPatternTypePair(PPattern pattern, PType type) { APatternTypePair result = new APatternTypePair(); result.setResolved(false); result.setPattern(pattern); result.setType(type); return result; }