A class model represents the model of a Ceylon class that you can inspect.

A class model can be either a toplevel Class or a member MemberClass.

no type hierarchy

Attributes
declarationSource Codeshared formal ClassDeclaration declaration

The declaration model of this class, which is necessarily a ClassDeclaration.

defaultConstructorSource Codeshared formal FunctionModel<Type,Arguments>? defaultConstructor

A function model for this class's initializer or default constructor, or null if this class has constructors but lacks a default constructor.

Inherited Attributes
Attributes inherited from: Object
Attributes inherited from: ClassOrInterface<Type>
Attributes inherited from: Declared
Attributes inherited from: Generic
Attributes inherited from: Model
Methods
getCallableConstructorsSource Codeshared formal FunctionModel<Type,Arguments>[] getCallableConstructors<Arguments = Nothing>(ClosedType<Annotation>[] annotationTypes)

Returns the list of shared callable constructors on this class and annotated with all the specified annotations. This does not include unshared callable constructors.

getConstructorSource Codeshared formal FunctionModel<Type,Arguments>|ValueModel<Type,Nothing>? getConstructor<Arguments>(String name)

Looks up a constructor by name, Returns null if no such constructor matches. This excludes unshared constructors.

Throws
getDeclaredCallableConstructorsSource Codeshared formal FunctionModel<Type,Arguments>[] getDeclaredCallableConstructors<Arguments = Nothing>(ClosedType<Annotation>[] annotationTypes)

Returns the list of callable constructors directly declared on this class and annotated with all the specified annotations. This includes unshared callable constructors.

getDeclaredConstructorSource Codeshared formal FunctionModel<Type,Arguments>|ValueModel<Type,Nothing>? getDeclaredConstructor<Arguments>(String name)

Looks up a constructor by name, Returns null if no such constructor matches. This includes unshared constructors.

Throws
getDeclaredValueConstructorsSource Codeshared formal ValueModel<Type,Nothing>[] getDeclaredValueConstructors(ClosedType<Annotation>[] annotationTypes)

Returns the list of value constructors directly declared on this class and annotated with all the specified annotations. This includes unshared constructors.

getValueConstructorsSource Codeshared formal ValueModel<Type,Nothing>[] getValueConstructors(ClosedType<Annotation>[] annotationTypes)

Returns the list of shared value constructors on this class and annotated with all the specified annotations. This does not include unshared value constructors.

Inherited Methods
Methods inherited from: Object
Methods inherited from: ClassOrInterface<Type>
Methods inherited from: ClosedType<Target>