Interface NativeContext
-
public interface NativeContextServices exposed to native-method handlers: heap access, class resolution, and guest string and exception construction.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ObjectInstancecreateException(String className, String message)Allocates a guest exception with its detail message field populated.ObjectInstancecreateString(String value)Interns a host string as a guest string instance.ClassResolvergetClassResolver()HeapManagergetHeapManager()
-
-
-
Method Detail
-
getHeapManager
HeapManager getHeapManager()
- Returns:
- the heap backing allocation, interning, and static-field access
-
getClassResolver
ClassResolver getClassResolver()
- Returns:
- the resolver used for class and member lookup
-
createString
ObjectInstance createString(String value)
Interns a host string as a guest string instance.- Parameters:
value- the host string- Returns:
- the guest string
-
createException
ObjectInstance createException(String className, String message)
Allocates a guest exception with its detail message field populated.- Parameters:
className- the internal name of the exception classmessage- the detail message, may be null to leave it unset- Returns:
- the guest exception instance
-
-