Enum RpcPacketFieldType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<RpcPacketFieldType>

    public enum RpcPacketFieldType
    extends java.lang.Enum<RpcPacketFieldType>
    Defines the various Perforce RPC packet field types and associated methods. Mainly used to determine whether to treat a packet field value as a string or bytes; most fields are strings, but things like worKRec or depotRec fields are binary pass-throughs from the point of view of the client (they're state keys and / or state records used by the server).
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      BINARY
      Field is bytes, not interpreted.
      NONE
      Field type is unknown.
      TEXT
      Field is text; possibly UTF-8 encoded.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static RpcPacketFieldType getFieldType​(java.lang.String fieldName)
      Return the field type associated with the passed-in name, if any.
      static RpcPacketFieldType valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static RpcPacketFieldType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • NONE

        public static final RpcPacketFieldType NONE
        Field type is unknown. Field should probably not be used.
      • TEXT

        public static final RpcPacketFieldType TEXT
        Field is text; possibly UTF-8 encoded.
    • Method Detail

      • values

        public static RpcPacketFieldType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (RpcPacketFieldType c : RpcPacketFieldType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static RpcPacketFieldType valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getFieldType

        public static RpcPacketFieldType getFieldType​(java.lang.String fieldName)
        Return the field type associated with the passed-in name, if any.
        Parameters:
        fieldName - fieldName
        Returns:
        RpcPacketFieldType