Package icyllis.arc3d.compiler.tree

# Class Type.AliasType

java.lang.Object
icyllis.arc3d.compiler.tree.Node
icyllis.arc3d.compiler.tree.Symbol
icyllis.arc3d.compiler.tree.Type
icyllis.arc3d.compiler.tree.Type.AliasType

Enclosing class:
  `Type`

public static final class Type.AliasType extends Type

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class icyllis.arc3d.compiler.tree.Type

  `Type.AliasType, Type.ArrayType, Type.CoercionCost, Type.Field, Type.GenericType, Type.ImageType, Type.MatrixType, Type.SamplerType, Type.ScalarType, Type.StructType, Type.VectorType`

  ## Nested classes/interfaces inherited from class icyllis.arc3d.compiler.tree.Node

  `Node.ElementKind, Node.ExpressionKind, Node.StatementKind, Node.SymbolKind`

- ## Field Summary

  ### Fields inherited from class icyllis.arc3d.compiler.tree.Type

  `kArray_TypeKind, kBoolean_ScalarKind, kFloat_ScalarKind, kGeneric_TypeKind, kMatrix_TypeKind, kMaxNestingDepth, kNonScalar_ScalarKind, kOther_TypeKind, kSampler_TypeKind, kScalar_TypeKind, kSigned_ScalarKind, kStruct_TypeKind, kUnsigned_ScalarKind, kUnsizedArray, kVector_TypeKind, kVoid_TypeKind`

  ### Fields inherited from class icyllis.arc3d.compiler.tree.Node

  `mPosition`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getArraySize()`
  For arrays, returns either the size of the array (if known) or -1 (unsized).
  `Type[]`
  `getCoercibleTypes()`
  For generic types, returns the types that this generic type can substitute for.
  `int`
  `getCols()`
  For matrices, returns the number of columns (e.g.
  `int`
  `getComponents()`
  For type that contains scalars, returns the number of scalars.
  `Type`
  `getComponentType()`
  For matrices and vectors, returns the scalar type of individual cells (e.g.
  `int`
  `getDimensions()`
  For sampler/image types, returns the SpvDim.
  `Type`
  `getElementType()`
  For arrays, returns the base type.
  `Type.Field[]`
  `getFields()`
  `double`
  `getMaxValue()`
  Returns the maximum value that can fit in the type.
  `double`
  `getMinValue()`
  Returns the minimum value that can fit in the type.
  `int`
  `getMinWidth()`
  For scalars, returns the minimum size in bits of the type.
  `int`
  `getRank()`
  Returns the "rank" of a numeric type, in order of float > half > int > short.
  `int`
  `getRows()`
  For matrices and vectors, returns the number of rows (e.g.
  `byte`
  `getScalarKind()`
  Returns the ScalarKind of this type (always NonScalar for non-scalar values).
  `int`
  `getWidth()`
  For scalars, returns the size in bits of the type.
  `boolean`
  `isArray()`
  `boolean`
  `isArrayed()`
  True for arrayed texture.
  `boolean`
  `isCombinedSampler()`
  `boolean`
  `isInterfaceBlock()`
  `boolean`
  `isMatrix()`
  `boolean`
  `isMultiSampled()`
  `boolean`
  `isSampled()`
  `boolean`
  `isScalar()`
  `boolean`
  `isSeparateSampler()`
  `boolean`
  `isShadow()`
  True for samplers that sample a depth texture with comparison (e.g., samplerShadow, sampler2DShadow, HLSL SamplerComparisonState).
  `boolean`
  `isStorageImage()`
  `boolean`
  `isStruct()`
  `boolean`
  `isUnsizedArray()`
  `boolean`
  `isVector()`
  `Type`
  `resolve()`
  If this is an alias, returns the underlying type, otherwise returns this.

  ### Methods inherited from class icyllis.arc3d.compiler.tree.Type

  `canCoerceTo, checkLiteralOutOfRange, coerceExpression, convertArraySize, convertArraySize, getArrayName, getCoercionCost, getDesc, getKind, getNestingDepth, getType, getTypeKind, isBoolean, isBooleanOrCompound, isFloat, isFloatOrCompound, isGeneric, isInBuiltinTypes, isInteger, isNumeric, isOpaque, isRelaxedPrecision, isSigned, isSignedOrCompound, isUnsigned, isUnsignedOrCompound, isUsableInArray, isVoid, makeAliasType, makeAliasType, makeArrayType, makeCombinedType, makeGenericType, makeImageType, makeMatrixType, makeSamplerType, makeScalarType, makeScalarType, makeSeparateType, makeSpecialType, makeStructType, makeTextureType, makeVectorType, matches, toCompound, toString, toVector`

  ### Methods inherited from class icyllis.arc3d.compiler.tree.Symbol

  `accept, getName, setName`

  ### Methods inherited from class icyllis.arc3d.compiler.tree.Node

  `getEndOffset, getStartOffset`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Method Details

  - ### resolve

    @Nonnull public Type resolve()
    Description copied from class: `Type`
    If this is an alias, returns the underlying type, otherwise returns this.
    Overrides:
      `resolve` in class `Type`

  - ### getElementType

    @Nonnull public Type getElementType()
    Description copied from class: `Type`
    For arrays, returns the base type. For matrices, returns the column vector type. For vectors, returns the scalar type. For all other types, returns the type itself.
    Overrides:
      `getElementType` in class `Type`

  - ### getComponentType

    @Nonnull public Type getComponentType()
    Description copied from class: `Type`
    For matrices and vectors, returns the scalar type of individual cells (e.g. mat2 has a component type of Float). For textures, returns the sampled type (e.g. texture2D has a component type of Float). For arrays, returns the component type of their base type. For all other types, returns the type itself.
    Overrides:
      `getComponentType` in class `Type`

  - ### getScalarKind

    public byte getScalarKind()
    Description copied from class: `Type`
    Returns the ScalarKind of this type (always NonScalar for non-scalar values).
    Overrides:
      `getScalarKind` in class `Type`

  - ### getRank

    public int getRank()
    Description copied from class: `Type`
    Returns the "rank" of a numeric type, in order of float > half > int > short. When operating on two numeric types, the result is the higher-rank type.
    Overrides:
      `getRank` in class `Type`

  - ### getCols

    public int getCols()
    Description copied from class: `Type`
    For matrices, returns the number of columns (e.g. mat3x4 returns 3). For scalars and vectors, returns 1. For all other types, causes an assertion failure.
    Overrides:
      `getCols` in class `Type`

  - ### getRows

    public int getRows()
    Description copied from class: `Type`
    For matrices and vectors, returns the number of rows (e.g. mat3x4 return 4). For scalars, returns 1. For all other types, causes an assertion failure.
    Overrides:
      `getRows` in class `Type`

  - ### getComponents

    public int getComponents()
    Description copied from class: `Type`
    For type that contains scalars, returns the number of scalars. For all other types, causes an assertion failure.
    Overrides:
      `getComponents` in class `Type`

  - ### getArraySize

    public int getArraySize()
    Description copied from class: `Type`
    For arrays, returns either the size of the array (if known) or -1 (unsized). For all other types, causes an assertion failure.
    Overrides:
      `getArraySize` in class `Type`

  - ### getMinValue

    public double getMinValue()
    Description copied from class: `Type`
    Returns the minimum value that can fit in the type.
    Overrides:
      `getMinValue` in class `Type`

  - ### getMaxValue

    public double getMaxValue()
    Description copied from class: `Type`
    Returns the maximum value that can fit in the type.
    Overrides:
      `getMaxValue` in class `Type`

  - ### getMinWidth

    public int getMinWidth()
    Description copied from class: `Type`
    For scalars, returns the minimum size in bits of the type.
    Overrides:
      `getMinWidth` in class `Type`

  - ### getWidth

    public int getWidth()
    Description copied from class: `Type`
    For scalars, returns the size in bits of the type.
    Overrides:
      `getWidth` in class `Type`

  - ### getDimensions

    public int getDimensions()
    Description copied from class: `Type`
    For sampler/image types, returns the SpvDim. For all other types, causes an assertion failure.
    Overrides:
      `getDimensions` in class `Type`

  - ### isShadow

    public boolean isShadow()
    Description copied from class: `Type`
    True for samplers that sample a depth texture with comparison (e.g., samplerShadow, sampler2DShadow, HLSL SamplerComparisonState).
    Overrides:
      `isShadow` in class `Type`

  - ### isArrayed

    public boolean isArrayed()
    Description copied from class: `Type`
    True for arrayed texture.
    Overrides:
      `isArrayed` in class `Type`

  - ### isScalar

    public boolean isScalar()
    Overrides:
      `isScalar` in class `Type`

  - ### isVector

    public boolean isVector()
    Overrides:
      `isVector` in class `Type`

  - ### isMatrix

    public boolean isMatrix()
    Overrides:
      `isMatrix` in class `Type`

  - ### isArray

    public boolean isArray()
    Overrides:
      `isArray` in class `Type`

  - ### isUnsizedArray

    public boolean isUnsizedArray()
    Overrides:
      `isUnsizedArray` in class `Type`

  - ### isStruct

    public boolean isStruct()
    Overrides:
      `isStruct` in class `Type`

  - ### isInterfaceBlock

    public boolean isInterfaceBlock()
    Overrides:
      `isInterfaceBlock` in class `Type`

  - ### isMultiSampled

    public boolean isMultiSampled()
    Overrides:
      `isMultiSampled` in class `Type`

  - ### isSampled

    public boolean isSampled()
    Overrides:
      `isSampled` in class `Type`

  - ### isCombinedSampler

    public boolean isCombinedSampler()
    Overrides:
      `isCombinedSampler` in class `Type`
    Returns:
      true for texture with sampler

  - ### isSeparateSampler

    public boolean isSeparateSampler()
    Overrides:
      `isSeparateSampler` in class `Type`
    Returns:
      true for pure sampler

  - ### isStorageImage

    public boolean isStorageImage()
    Overrides:
      `isStorageImage` in class `Type`
    Returns:
      true for image, except subpass input

  - ### getCoercibleTypes

    @Nonnull public Type[] getCoercibleTypes()
    Description copied from class: `Type`
    For generic types, returns the types that this generic type can substitute for.
    Overrides:
      `getCoercibleTypes` in class `Type`

  - ### getFields

    @Nonnull public Type.Field[] getFields()
    Overrides:
      `getFields` in class `Type`