A class model represents the model of a Ceylon class that you can instantiate and inspect.
A member class is is declared on classes or interfaces.
This is both a ClassModel and a Member: you can invoke it with an instance value
to bind it to that instance and obtain a Class:
shared class Outer(String name){
shared class Inner(){
shared String hello => "Hello "+name;
}
}
void test(){
MemberClass<Outer,Outer.Inner,[]> memberClass = `Outer.Inner`;
Class<Outer.Inner,[]> c = memberClass(Outer("Stef"));
// This will print: Hello Stef
print(c().hello);
}
no type hierarchy
no subtypes hierarchy
| Inherited Attributes |
Attributes inherited from: Object |
Attributes inherited from: ClassModel<Type,Arguments> |
Attributes inherited from: ClassOrInterface<Type> |
Attributes inherited from: Generic |
Attributes inherited from: Member<Container,Kind> |
Attributes inherited from: Model |
| Methods | |
bind | Source Codeshared formal Class<Type,Arguments> bind(Object container)Type-unsafe container binding, to be used when the container type is unknown until runtime. This has the same behaviour as invoking this Refines Member.bind |
| Inherited Methods |
Methods inherited from: Object |
Methods inherited from: ClassOrInterface<Type>ClassOrInterface.getAttribute(), ClassOrInterface.getAttributes(), ClassOrInterface.getClass(), ClassOrInterface.getClassOrInterface(), ClassOrInterface.getClasses(), ClassOrInterface.getDeclaredAttribute(), ClassOrInterface.getDeclaredAttributes(), ClassOrInterface.getDeclaredClass(), ClassOrInterface.getDeclaredClassOrInterface(), ClassOrInterface.getDeclaredClasses(), ClassOrInterface.getDeclaredInterface(), ClassOrInterface.getDeclaredInterfaces(), ClassOrInterface.getDeclaredMethod(), ClassOrInterface.getDeclaredMethods(), ClassOrInterface.getInterface(), ClassOrInterface.getInterfaces(), ClassOrInterface.getMethod(), ClassOrInterface.getMethods() |
Methods inherited from: Member<Container,Kind> |
Methods inherited from: Type<Type> |