ceylon.language.meta.model.ClassModel.ceylon Maven / Gradle / Ivy
import ceylon.language.meta.declaration {
ClassDeclaration
}
import ceylon.language.meta.model {
ClosedType = Type
}
"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]].
"
shared sealed interface ClassModel
satisfies ClassOrInterface
given Arguments satisfies Anything[] {
"The declaration model of this class,
which is necessarily a [[ClassDeclaration]]."
shared formal actual ClassDeclaration declaration;
"A function model for this class's initializer or default constructor,
or null if this class has constructors but lacks a default constructor."
since("1.2.0")
shared formal FunctionModel? defaultConstructor;
"Looks up a constructor by name,
Returns `null` if no such constructor matches.
This excludes unshared constructors."
throws(`class IncompatibleTypeException`,
"If the specified type arguments are not
compatible with the actual result.")
since("1.2.0")
shared formal FunctionModel|ValueModel? getConstructor
(String name)
given Arguments satisfies Anything[];
"Looks up a constructor by name,
Returns `null` if no such constructor matches.
This includes unshared constructors."
throws(`class IncompatibleTypeException`,
"If the specified type arguments are not
compatible with the actual result.")
since("1.2.0")
shared formal FunctionModel|ValueModel? getDeclaredConstructor
(String name)
given Arguments satisfies Anything[];
"Returns the list of callable constructors directly declared on this class
and annotated with all the specified annotations.
This includes unshared callable constructors."
since("1.2.0")
shared formal FunctionModel[] getDeclaredCallableConstructors
(ClosedType* annotationTypes)
given Arguments satisfies Anything[];
"Returns the list of shared callable constructors on this class
and annotated with all the specified annotations.
This does not include unshared callable constructors."
since("1.2.0")
shared formal FunctionModel[] getCallableConstructors
(ClosedType* annotationTypes)
given Arguments satisfies Anything[];
"Returns the list of value constructors directly declared on this class
and annotated with all the specified annotations.
This includes unshared constructors."
since("1.2.0")
shared formal ValueModel[] getDeclaredValueConstructors
(ClosedType* 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."
since("1.2.0")
shared formal ValueModel[] getValueConstructors
(ClosedType* annotationTypes);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy