[Vala] Final / Sealed classes in Vala
- From: Marco Trevisan (Treviño) <mail 3v1n0 net>
- To: vala-list gnome org
- Subject: [Vala] Final / Sealed classes in Vala
- Date: Tue, 22 Sep 2009 06:40:10 +0200
Is it possible to define both in VAPIs and in a vala code a class which
can not be extended?
I mean something like "final" does for Java and "sealed" for C#...
I think they could be useful for grouping static methods in "virtual
classes" (I mean in a class which name has not a reference in a C
type/structure, but that has just been written for organizing similar
methods) without the risk of methods overriding or of extending a
"virtual" class that has been defined in a VAPI but that is not
available in the relative C code.
For example:
public final class Utility {
public static void my_method();
}
or in VAPI:
public abstract final MyOwnType {
public static void c_referenced_method1();
public static void c_referenced_method2();
}
I hope you got the idea... :P
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]