Class Array

java.lang.Object
net.codecrete.windowsapi.metadata.Type
net.codecrete.windowsapi.metadata.Array

public final class Array extends Type
Array type.
  • Constructor Details

    • Array

      public Array(String name, Namespace namespace, int typeDefIndex, Type itemType, int arrayLength)
      Creates a new instance.
      Parameters:
      name - the type name
      namespace - the type's namespace
      typeDefIndex - the TypeDef index
      itemType - the type of the array items
      arrayLength - the array length (number of items)
  • Method Details

    • itemType

      public Type itemType()
      Gets the type of the array items.
      Returns:
      the type
    • arrayLength

      public int arrayLength()
      Gets the array length.

      For flexible length arrays, this method usually refers 0 or 1, depending on how it is declared in the metadata.

      Returns:
      the number of items
    • isFlexible

      public boolean isFlexible()
      Indicates if the array has a flexible length (as opposed to variable length).
      Returns:
      true if the array has flexible length, false is it has fixed length
    • setFlexible

      public void setFlexible(boolean isFlexible)
      Sets if the array has a flexible length (as opposed to variable length).
      Parameters:
      isFlexible - true if the array has flexible length, false is it has fixed length
    • referencedTypes

      public Stream<Type> referencedTypes()
      Description copied from class: Type
      Returns the types directly references by this type.
      Overrides:
      referencedTypes in class Type
      Returns:
      Stream of types