Declaration model for callable constructors, for example

class WithConstructors {
    shared new () {}
    shared new clone(WithConstructors other) {}

// ...

CallableConstructorDeclaration default = `new WithConstructors`;
CallableConstructorDeclaration clone = `new WithConstructors.clone`;

The initializer of a class with a parameter list can also be represented as a CallableConstructorDeclaration.

Since 1.2.0

no type hierarchy

no subtypes hierarchy

Attributes
abstractSource Codeshared formal Boolean abstract

True if the constructor has an abstract annotation.

containerSource Codeshared formal ClassDeclaration container

The class this constructor constructs

defaultConstructorSource Codeshared formal Boolean defaultConstructor

Whether this is the default constructor. The default constructor of a class is the constructor with no name.

Inherited Attributes
Attributes inherited from: Object
Attributes inherited from: Declaration
Attributes inherited from: FunctionalDeclaration
Attributes inherited from: GenericDeclaration
Attributes inherited from: NestableDeclaration
Attributes inherited from: TypedDeclaration
Methods
applySource Codeshared formal CallableConstructor<Result,Arguments> apply<Result = Object, Arguments = Nothing>(Type<Anything>[] typeArguments)

Applies the given closed type arguments to the declaration of the class enclosing this constructor declaration, returning a function model for the constructor

invokeSource Codeshared formal Object invoke(Type<Anything>[] typeArguments, Anything[] arguments)

Invokes the underlying toplevel function, by applying the specified type arguments and value arguments.

memberApplySource Codeshared formal MemberClassCallableConstructor<Container,Result,Arguments> memberApply<Container = Nothing, Result = Object, Arguments = Nothing>(Type<Object> containerType, Type<Anything>[] typeArguments)

Applies the given closed type arguments to the declaration of the member class enclosing this constructor declaration, returning a method model for the constructor

memberInvokeSource Codeshared formal Object memberInvoke(Object container, Type<Anything>[] typeArguments, Anything[] arguments)

Invokes the underlying method, by applying the specified type arguments and value arguments.

Inherited Methods
Methods inherited from: Object
Methods inherited from: Annotated
Methods inherited from: AnnotatedDeclaration
Methods inherited from: FunctionalDeclaration
Methods inherited from: GenericDeclaration