java.lang.Object
java.lang.Enum<PrimitiveType>
de.mirkosertic.bytecoder.core.backend.wasm.ast.PrimitiveType
All Implemented Interfaces:
WasmType, Serializable, Comparable<PrimitiveType>, java.lang.constant.Constable

public enum PrimitiveType extends Enum<PrimitiveType> implements WasmType
  • Enum Constant Details

  • Field Details

    • text

      private final String text
    • binaryType

      private final byte binaryType
  • Constructor Details

    • PrimitiveType

      private PrimitiveType(String text, byte binaryType)
  • Method Details

    • values

      public static PrimitiveType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static PrimitiveType valueOf(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:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • writeTo

      public void writeTo(TextWriter textWriter)
      Specified by:
      writeTo in interface WasmType
    • writeRefTo

      public void writeRefTo(TextWriter writer)
      Specified by:
      writeRefTo in interface WasmType
    • writeTo

      public void writeTo(BinaryWriter.Writer sectionWriter)
      Specified by:
      writeTo in interface WasmType
    • index

      public int index()
      Specified by:
      index in interface WasmType
    • getBinaryType

      public byte getBinaryType()