Class PortInfo


public final class PortInfo extends PMap.MapBasedValue
Information on the type, direction and properties for a Port.
  • Field Details

  • Method Details

    • portType

      public String portType()
      The type of the port.
      Returns:
      port type
    • direction

      public PortInfo.Direction direction()
      The direction of the port.
      Returns:
      port direction
    • properties

      public PMap properties()
      Access the map of properties. The map includes the type and direction, as well as any custom or optional properties.

      This method is equivalent to calling PMap.MapBasedValue.dataMap().

      Returns:
      property map
    • create

      public static PortInfo create(Class<? extends Port> typeClass, PortInfo.Direction direction, PMap properties)
      Create a PortInfo.
      Parameters:
      typeClass - port base class
      direction - port direction
      properties - additional properties (may be null)
      Returns:
      port info
    • from

      public static Optional<PortInfo> from(Value arg)
      Coerce the provided Value into a PortInfo if possible.
      Parameters:
      arg - value of unknown type
      Returns:
      port info or empty optional
    • parse

      public static PortInfo parse(String string) throws ValueFormatException
      Parse the provided String into a PortInfo if possible.
      Parameters:
      string - text to parse
      Returns:
      port info
      Throws:
      ValueFormatException - if parsing fails