code: public XExtension getByIndex(int index) {
                  if (index < 0 || index >= extensionList.size()) {
                          return null;
                  }
                  return extensionList.get(index);
          }
docs: Retrieves an extension by ints index. If no extension with the given
  index is found, this method returns <code>null</code>.
  
  @param index The index of the requested extension.
  @return The requested extension (may be <code>null</code>, if it
  cannot be found).