Package icyllis.arc3d.compiler.tree

# Class FunctionDecl

java.lang.Object
icyllis.arc3d.compiler.tree.Node
icyllis.arc3d.compiler.tree.Symbol
icyllis.arc3d.compiler.tree.FunctionDecl

public final class FunctionDecl extends Symbol
Represents a function declaration (function symbol). If the function is overloaded, it will serve as a singly linked list.

- ## 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
  Constructor
  Description
  `FunctionDecl(int position, Modifiers modifiers, String name, List<Variable> parameters, Type returnType, boolean builtin, boolean entryPoint, int intrinsicKind)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static FunctionDecl`
  `convert(Context context, int pos, Modifiers modifiers, String name, List<Variable> parameters, Type returnType)`
  `FunctionDefinition`
  `getDefinition()`
  `int`
  `getIntrinsicKind()`
  `Node.SymbolKind`
  `getKind()`
  `String`
  `getMangledName()`
  `Modifiers`
  `getModifiers()`
  `FunctionDecl`
  `getNextOverload()`
  `List<Variable>`
  `getParameters()`
  `Type`
  `getReturnType()`
  `Type`
  `getType()`
  `boolean`
  `isBuiltin()`
  `boolean`
  `isEntryPoint()`
  `boolean`
  `isIntrinsic()`
  `Type`
  `resolveParameterTypes(List<Expression> arguments, List<Type> outParameterTypes)`
  `void`
  `setDefinition(FunctionDefinition definition)`
  `void`
  `setNextOverload(FunctionDecl overload)`
  Sets the previously defined function symbol with the same function name.
  `String`
  `toString()`

  ### 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`

- ## Constructor Details

  - ### FunctionDecl

    public FunctionDecl(int position, Modifiers modifiers, String name, List<Variable> parameters, Type returnType, boolean builtin, boolean entryPoint, int intrinsicKind)

- ## Method Details

  - ### convert

    @Nullable public static FunctionDecl convert(@Nonnull Context context, int pos, @Nonnull Modifiers modifiers, @Nonnull String name, @Nonnull List<Variable> parameters, @Nonnull Type returnType)

  - ### getKind

    @Nonnull public Node.SymbolKind getKind()
    Specified by:
      `getKind` in class `Symbol`
    See Also:
      - `Node.SymbolKind`

  - ### getType

    @Nonnull public Type getType()
    Specified by:
      `getType` in class `Symbol`

  - ### getReturnType

    @Nonnull public Type getReturnType()

  - ### getIntrinsicKind

    public int getIntrinsicKind()

  - ### isIntrinsic

    public boolean isIntrinsic()

  - ### getDefinition

    public FunctionDefinition getDefinition()

  - ### setDefinition

    public void setDefinition(FunctionDefinition definition)

  - ### getParameters

    public List<Variable> getParameters()

  - ### getMangledName

    @Nonnull public String getMangledName()

  - ### getNextOverload

    @Nullable public FunctionDecl getNextOverload()

  - ### setNextOverload

    public void setNextOverload(FunctionDecl overload)
    Sets the previously defined function symbol with the same function name.

  - ### getModifiers

    public Modifiers getModifiers()

  - ### isBuiltin

    public boolean isBuiltin()

  - ### isEntryPoint

    public boolean isEntryPoint()

  - ### resolveParameterTypes

    @Nullable public Type resolveParameterTypes(@Nonnull List<Expression> arguments, List<Type> outParameterTypes)

  - ### toString

    @Nonnull public String toString()
    Specified by:
      `toString` in class `Node`
    Returns:
      a string representation of this AST node