Here you can find the source of extractReferences(String value)
private static String[] extractReferences(String value)
//package com.java2s; import java.util.ArrayList; import java.util.List; public class Main { private static String[] extractReferences(String value) { List l = new ArrayList(); for (int i = 0; i < value.length(); i++) if ('$' == value.charAt(i)) { int start = i + 2; while ('}' != value.charAt(i)) i++;/*from w w w.j a va2 s. com*/ int end = i; l.add(value.substring(start, end)); } return (String[]) l.toArray(new String[0]); } }