Interface TargetTypeMapping<T>
- Type Parameters:
T- The target type
public interface TargetTypeMapping<T>
Strategy interface that defines a host target type mapping for GraalVM HostAccess.
Implementations are discovered as beans and registered with HostAccess so that
Value.as(TargetType) can convert guest values to the desired host type.
- Since:
- 5.2.0
-
Method Details
-
targetType
-
assignableTargetTypes
- Returns:
- Additional erased Java target classes this mapping can satisfy.
-
convert
Convert the given polyglot value to the target type. Invoked by HostAccess when resolving Value.as(targetType).- Parameters:
value- The guest value to convert- Returns:
- The converted host value
-