Get/Set Values for Instance Fields and Properties
You are browsing legacy Javonet 1.5 (Java<>.NET bridge for Windows) documentation. Use the left side menu or click here to switch to latest Javonet 2.0 documentation. Javonet 2.0 allows you to use any module from
JVM, CLR, Netcore, Python, Ruby, Perl, NodeJS on Windows, Linux and MacOs
from any application created in Java, Clojure, Groovy, Kotlin, C#, F#, J#, VB.NET, Python, Perl, Ruby, JavaScript, TypeScript, C++ and GoLang
To set or get values of instance fields and properties, get or create an instance of the object from any runtime, and call "get(fieldOrPropertyName)" or "set(fieldOrPropertyName,newValue)" methods on NObject\JObject containing this field. Assuming we have a custom any runtime with the following class inside:
Select technology of module you want to use:
To set and get instance field from this class:
Select technology of module you want to use:
Was this article helpful?