Is reflection supported in RTSJ?
Yes, RTSJ supports the reflection classes. However, the caching mechanism used in the reflection classes to boost performance can cause an IllegalAssignmentException when a scoped schedulable tries to fill the cache with a scope-allocated object, or an IllegalAccessException when a NHRT tries to access a heap-allocated object that has been written to cache. The use of the caching mechanism can be easily disabled by setting the sun.reflect.noCaches property to “true.” In addition, some reflection optimization code might cause an exception with scoped memory because it changes a pointer towards a new scope-allocated reflection object. To disable this optimization, you can set the sun.reflect.noInflation property to “true.
Yes, RTSJ supports the reflection classes. However, the caching mechanism used in the reflection classes to boost performance can cause an IllegalAssignmentException when a scoped schedulable tries to fill the cache with a scope-allocated object, or an IllegalAccessException when a NHRT tries to access a heap-allocated object that has been written to cache. The use of the caching mechanism can be easily disabled by setting the sun.reflect.noCaches property to “true.” In addition, some reflection optimization code might cause an exception with scoped memory because it changes a pointer towards a new scope-allocated reflection object.