getField

Note that the type of the field should be expressed using the type variables of this particular type. Consider for example:

class Foo{ E field; }

class Bar extends Foo{ }

When calling getField("field") on Foo I should get a FieldDeclaration with type E, while calling it on Bar I should get a FieldDeclaration with type String.