Class TypeManager

java.lang.Object
de.inetsoftware.jwebassembly.module.TypeManager

public class TypeManager extends Object
Manage the written and to write types (classes)
Author:
Volker Berlin
  • Field Details

    • FIELD_VALUE

      public static final String FIELD_VALUE
      Name of field with array value.
      See Also:
    • TYPE_DESCRIPTION_INTERFACE_OFFSET

      public static final int TYPE_DESCRIPTION_INTERFACE_OFFSET
      Byte position in the type description that contains the offset to the interfaces. Length 4 bytes.
      See Also:
    • TYPE_DESCRIPTION_INSTANCEOF_OFFSET

      public static final int TYPE_DESCRIPTION_INSTANCEOF_OFFSET
      Byte position in the type description that contains the offset to the instanceof list. Length 4 bytes.
      See Also:
    • TYPE_DESCRIPTION_TYPE_NAME

      public static final int TYPE_DESCRIPTION_TYPE_NAME
      Byte position in the type description that contains the offset to class name idx in the string constant table. Length 4 bytes.
      See Also:
    • TYPE_DESCRIPTION_ARRAY_TYPE

      public static final int TYPE_DESCRIPTION_ARRAY_TYPE
      Byte position in the type description that contains the type of the array (component type). Length 4 bytes.
      See Also:
    • BOOLEAN

      public static final int BOOLEAN
      Type id of primitive class
      See Also:
    • BYTE

      public static final int BYTE
      Type id of primitive class
      See Also:
    • CHAR

      public static final int CHAR
      Type id of primitive class
      See Also:
    • DOUBLE

      public static final int DOUBLE
      Type id of primitive class
      See Also:
    • FLOAT

      public static final int FLOAT
      Type id of primitive class
      See Also:
    • INT

      public static final int INT
      Type id of primitive class
      See Also:
    • LONG

      public static final int LONG
      Type id of primitive class
      See Also:
    • SHORT

      public static final int SHORT
      Type id of primitive class
      See Also:
    • VOID

      public static final int VOID
      Type id of primitive class
      See Also:
  • Method Details

    • size

      public int size()
      Count of used types
      Returns:
      the count
    • valueOf

      @Nonnull public TypeManager.StructType valueOf(String name)
      Get the StructType. If needed an instance is created.
      Parameters:
      name - the type name like java/lang/Object
      Returns:
      the struct type
    • arrayType

      @Nonnull public ArrayType arrayType(AnyType arrayType)
      Get the array type for the given component type.
      Parameters:
      arrayType - the component type of the array
      Returns:
      the array type