我想在SQL表中存储构造函数或构造函数的引用,以查找类名,并能够访问构造函数并从那里实例化。在C中我只存储一个指向静态函数的指针;我如何用Java做到这一点?有什么想法吗?
// Creating Tables
@Override
public void onCreate(SQLiteDatabase db) {
String CREATE_CONTACTS_TABLE = "CREATE TABLE " + TABLE_CONTACTS + "("
+ KEY_ID + " INTEGER PRIMARY KEY," + KEY_NAME + " TEXT,"
+ KEY_CONSTRUCTOR + " ///SOMETHING THAT CAN DESCRIBE A CONSTRUCTOR///" + ")";
db.execSQL(CREATE_CONTACTS_TABLE);
}