NodeWithTypeArguments

A node that can have type arguments.

    new X();        --> typeArguments == Optional is empty
    new X<>();      --> typeArguments = [], diamondOperator = true
    new X<C,D>();   --> typeArguments = [C,D], diamondOperator = false
Only ObjectCreationExpr uses the diamond operator. On other nodes it is treated the same as the first case.

Inheritors

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Removes all type arguments, including the surrounding <>.
Link copied to clipboard
open fun setDiamondOperator(): N
Sets the type arguments to <>.
Link copied to clipboard
abstract fun setTypeArguments(typeArguments: NodeList<Type>): N
Allows you to set the generic arguments
open fun setTypeArguments(typeArguments: Array<Type>): N