Usually you should initialize the object; I don't remember why, but you could set the values of members even if you do not initialize the object, but, anyway, it is a bad practice.
The property IsInitialized is useful to know (to check) if the object has already been initialized, after its declaration.
I suppose that your Assigned routine (which name should be Assignment, I think) is only an example, because I cannot understand its purpose, as it is.
Then it will probably not work.
You are dimming a new Objectinstance but you are not returning it from the sub. So the variable will be discarded at the end of the sub.
B4X:
Public Sub Assign(fnName As String,fnParam() As Object) As thdfunction
Dim obj As thdfunction
obj.initialize
obj.name =fnName
obj.param = fnParam
return obj
End Sub