Get data from custom field with dynamic content in Jira

I want to develop a custom field as part of a Java based Jira plugin (Jira Server) that computes its value on the fly when the corresponding screen is loaded - no data has to be saved in the database. Based on the tutorial, I have developed such a field that already shows the result in velocity based views (by overriding getVelocityParameters(…) in the customfield class). Now I also want retrieve its value from other Java functions, e.g. for a Web Panel, and e.g. through REST. This snippet however returns only a customField Value null:

CustomField customField = (CustomField) this.customFieldManager.getCustomFieldObjectsByName(“Myfield”).toArray()[0];
final Object customFieldValue =currentIssue.getCustomFieldValue(customField);

I assume I have to override another method in the custom field class, but which?

Thanks any hint!