There is a class TestClass that has a field of List type. Unfortunately, we don't know a type of the List's parameter:
class TestClass {
...
public List<UNKNOWN_TYPE> listField;
..
}
To obtain it, let's implement printParameterType method that accepts an instance of TestClass and the name of its field. The method should print a full name of the parameter type (package + class name).