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 and high precedences are invoked before all default mappings. Low after all loss less conversions and lowest 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 and high have the same precedence as the default loss-less mapping. The precedence low declares equal precedence than all lossy coercions and lowest defines precedence lower than all default mappings.
Since:
20.3
See Also:
  • Enum Constant Details

    • HIGHEST

      public static final HostAccess.TargetMappingPrecedence HIGHEST
      Defines higher precedence and conversion order as all default mappings and target type mappings with lower precedence.
      Since:
      20.3
    • HIGH

      public static final HostAccess.TargetMappingPrecedence 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

      public static final HostAccess.TargetMappingPrecedence 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

      public static final HostAccess.TargetMappingPrecedence 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

      public static HostAccess.TargetMappingPrecedence[] 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

      public static HostAccess.TargetMappingPrecedence valueOf(String name)
      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 name
      NullPointerException - if the argument is null