Class TypeCompatibility
java.lang.Object
com.soulfiremc.server.script.TypeCompatibility
Single source of truth for port type compatibility rules.
Used by both the server-side graph validator and the client-side connection check
(via the PortTypeMetadata proto sent in GetNodeTypesResponse).
-
Method Summary
Modifier and TypeMethodDescriptiongetCompatibleFrom(PortType targetType) Returns the compatible_from set for a given target type.static booleanisCompatible(PortType source, PortType target) Checks whether a source port type is compatible with a target port type.static booleanisDescriptorCompatible(TypeDescriptor source, TypeDescriptor target) Checks whether a source TypeDescriptor is compatible with a target TypeDescriptor.
-
Method Details
-
isCompatible
-
isDescriptorCompatible
Checks whether a source TypeDescriptor is compatible with a target TypeDescriptor. Handles generics, type variables, and parameterized types. This is a non-mutating check (does not bind type variables). -
getCompatibleFrom
-