public Object[] toArray() { Object[] a = new Object[fGrammarCount]; toArray0(a); return a; }
public Object[] toArray(Object[] a) { if (a.length < fGrammarCount) { Class arrayClass = a.getClass(); Class componentType = arrayClass.getComponentType(); a = (Object[]) Array.newInstance(componentType, fGrammarCount); } toArray0(a); if (a.length > fGrammarCount) { a[fGrammarCount] = null; } return a; }