/** * Get a set of definitions for the pattern's variables. Note that if the pattern includes duplicate variable names, * these are collapse into one. * * @param rp * @param ptype * @param scope * @return */ public List<PDefinition> getDefinitions(PPattern rp, PType ptype, NameScope scope) { PDefinitionSet set = af.createPDefinitionSet(); set.addAll(af.createPPatternAssistant().getAllDefinitions(rp, ptype, scope)); List<PDefinition> result = new Vector<PDefinition>(set); return result; }