Package org.graalvm.polyglot
Enum Class HostAccess.TargetMappingPrecedence
java.lang.Object
java.lang.Enum<HostAccess.TargetMappingPrecedence>
org.graalvm.polyglot.HostAccess.TargetMappingPrecedence
- All Implemented Interfaces:
Serializable
,Comparable<HostAccess.TargetMappingPrecedence>
,Constable
- Enclosing class:
HostAccess
public static enum HostAccess.TargetMappingPrecedence
extends Enum<HostAccess.TargetMappingPrecedence>
Represents the precedence of a target type mapping. The precedence influences target type
mappings in two ways:
- The conversion order in which target mappings are performed.
Highest
andhigh
precedences are invoked before alldefault mappings
.Low
after all loss less conversions andlowest
after all other default mappings. - To disambiguate multiple selected overloads on method invocation. The overload precedence
defines which method has precedence over other applicable methods.
Highest
have higher andhigh
have the same precedence as the default loss-less mapping. The precedencelow
declares equal precedence than all lossy coercions andlowest
defines precedence lower than all default mappings.
- Since:
- 20.3
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionDefines high or default precedence and conversion order for a target type mapping.Defines higher precedence and conversion order as all default mappings and target type mappings with lower precedence.Defines low precedence and conversion order for a target type mapping.Defines lowest precedence and conversion order for a target type mapping. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static HostAccess.TargetMappingPrecedence[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
HIGHEST
Defines higher precedence and conversion order as all default mappings and target type mappings with lower precedence.- Since:
- 20.3
-
HIGH
Defines high or default precedence and conversion order for a target type mapping. This precedence makes mappings be used before all other default mappings and treated with equal overload precedence as default loss less mappings like primitive coercions.- Since:
- 20.3
-
LOW
Defines low precedence and conversion order for a target type mapping. This precedence makes mappings be used before all other default lossy mappings and treated with equal overload precedence as default lossy mappings, like mappings to Map.- Since:
- 20.3
-
LOWEST
Defines lowest precedence and conversion order for a target type mapping. This precedence makes mappings be used after all other default mappings and treated with lower overload precedence as all default mappings or other target type mappings.- Since:
- 20.3
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-