JMethod method = new JMethod(fieldInfo.getReadMethodName(), contentType.getJType(),
"the value of the " + contentType.getJType().toString() + " at the given index");
method.addException(SGTypes.INDEX_OUT_OF_BOUNDS_EXCEPTION,
"if the index given is outside the bounds of the collection");
method.addParameter(new JParameter(JType.INT, "index"));
JSourceCode sourceCode = method.getSourceCode();
this.addIndexCheck(fieldInfo, sourceCode, method.getName());
String value = fieldInfo.getName() + ".get(index)";