Method: ContextHelper()

1: package org.overture.pog.utility;
2:
3: import java.util.LinkedList;
4: import java.util.List;
5:
6: import org.overture.ast.patterns.ATypeMultipleBind;
7: import org.overture.ast.patterns.PMultipleBind;
8: import org.overture.ast.patterns.PPattern;
9: import org.overture.ast.types.PType;
10:
11: public abstract class ContextHelper
12: {
13:
14:         public static List<PMultipleBind> bindListFromPattern(PPattern pattern,
15:                         PType type)
16:         {
17:                 List<PMultipleBind> bindList = new LinkedList<PMultipleBind>();
18:                 ATypeMultipleBind tmBind = new ATypeMultipleBind();
19:                 List<PPattern> plist = new LinkedList<PPattern>();
20:                 plist.add(pattern.clone());
21:                 tmBind.setPlist(plist);
22:                 tmBind.setType(type.clone());
23:                 bindList.add(tmBind);
24:                 return bindList;
25:         }
26:
27: }