@SuppressWarnings("unchecked")
	private <T extends Member> List<T>
	extractJavaMethods(PyReflectedFunction pyReflectedFunction)
		throws NonInstrumentableTypeException {

		// ReflectedArgs is package scope in Jython 2.2.1; use reflection
		// to avoid compilation issues.

		final Object[] argsList = pyReflectedFunction.argslist;
		final int nargs = pyReflectedFunction.nargs;

		final List<T> result = new ArrayList<T>(nargs);

		for (int i = 0; i < nargs; ++i) {
			final Object argument = argsList[i];

			try {
				final Field dataField = argument.getClass().getField("data");
				dataField.setAccessible(true);
				result.add((T)dataField.get(argument));
			}
			catch (Exception e) {
				throw new NonInstrumentableTypeException(
					e.getMessage() + " [" + pyReflectedFunction + "]",
					e);
			}
		}

		return result;
	}
Extract and instrument the underlying Java methods for instrumentation.

@param <T>
         Constructor<?> or Method
@param pyReflectedFunction
         The Jython object.
@return A list of Java methods or constructors.
@throws NonInstrumentableTypeException
          If the methods could not be extracted.
ngrinder-runtime/src/main/java/net/grinder/scriptengine/jython/instrumentation/dcr/AbstractJythonDCRInstrumenter.java