Instance fields and properties

This article provides an introduction to cross-technology handling of instance fields and properties from any runtime using any language. The article explains how to get and set any instance field/property.

With Javonet you can interact with instance fields and properties from any runtime like they were available in any language but invocation must be performed through Javonet SDK API, passing the name of the field or property as string.

Get/Set instance field from custom any runtime

With Javonet it is possible to reference any custom any runtime and interact with public instance fields and properties declared on types defined within that module almost the same as with any other any language library.

This section present sample custom any runtime with class declaring instance field and Javonet SDK syntax required to use that field and consume the results in any language.

Code example below represents the sample code from any runtime that will be used in following sections.

It is possible to get one of the declared instance fields from any runtime using following any language code. This uses in memory runtime bridging to load the any runtime, and next retrieves reference to specific type, creates its instance, and gets the instance field. Result of the invocation is returned as regular any language value and can be used for further processing.

Select technology of module you want to use:

Get/Set instance field from standard any runtime

The same steps are required to use types and fields from standard any runtime:

Select technology of module you want to use: