Package icyllis.arc3d.compiler.tree

# Class ConstructorCall

java.lang.Object
icyllis.arc3d.compiler.tree.Node
icyllis.arc3d.compiler.tree.Expression
icyllis.arc3d.compiler.tree.ConstructorCall

Direct Known Subclasses:
  `ConstructorArray`, `ConstructorArrayCast`, `ConstructorCompound`, `ConstructorCompoundCast`, `ConstructorDiagonalMatrix`, `ConstructorMatrixResize`, `ConstructorScalarCast`, `ConstructorStruct`, `ConstructorVectorSplat`

public abstract class ConstructorCall extends Expression
Base class representing a constructor call: type_name( args, ... ).

See Also:
  - `FunctionCall`

- ## Nested Class Summary

  ## 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.Node

  `mPosition`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `ConstructorCall(int position, Type type, Expression[] arguments)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `accept(TreeVisitor visitor)`
  Visit this AST with a given visitor.
  `static Expression`
  `convert(Context context, int pos, Type type, List<Expression> args)`
  `final Expression`
  `getArgument()`
  `final @Unmodifiable Expression[]`
  `getArguments()`
  `final Type`
  `getComponentType()`
  `OptionalDouble`
  `getConstantValue(int i)`
  Returns the i'th compile-time constant value within a literal or constructor.
  `final boolean`
  `isConstructorCall()`
  `String`
  `toString(int parentPrecedence)`

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

  `clone, clone, getCoercionCost, getKind, getType, isBooleanLiteral, isFloatLiteral, isIncomplete, isIntLiteral, isLiteral, toString`

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

  `getEndOffset, getStartOffset`

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

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

- ## Constructor Details

  - ### ConstructorCall

    protected ConstructorCall(int position, Type type, Expression[] arguments)

- ## Method Details

  - ### convert

    @Nullable public static Expression convert(@Nonnull Context context, int pos, @Nonnull Type type, @Nonnull List<Expression> args)

  - ### accept

    public boolean accept(@Nonnull TreeVisitor visitor)
    Description copied from class: `Node`
    Visit this AST with a given visitor.
    Specified by:
      `accept` in class `Node`
    Returns:
      true to stop recursion and propagate true up the stack, false to continue

  - ### isConstructorCall

    public final boolean isConstructorCall()
    Overrides:
      `isConstructorCall` in class `Expression`

  - ### getComponentType

    public final Type getComponentType()

  - ### getArgument

    public final Expression getArgument()

  - ### getArguments

    public final @Unmodifiable Expression[] getArguments()

  - ### getConstantValue

    public OptionalDouble getConstantValue(int i)
    Description copied from class: `Expression`
    Returns the i'th compile-time constant value within a literal or constructor. Indices which do not contain compile-time constant values will return empty. `vec4(1, vec2(2), 3)` contains four compile-time constants: (1, 2, 2, 3) `mat2(f)` contains four slots, and two are constant: (empty, 0, 0, empty)
    Overrides:
      `getConstantValue` in class `Expression`

  - ### toString

    @Nonnull public String toString(int parentPrecedence)
    Specified by:
      `toString` in class `Expression`