I need to determine how many arguments a constructor accepts during runtime in a generic method. I know every type T extends the same baseclass and they only have one constructor each, but they take different amount of parameters.
public T someMethod() {
// get amount of parameters T constructor takes
}
Is there a simple way of achieving this?
Aucun commentaire:
Enregistrer un commentaire