i am using a class with a number of "properties" using the set/get feature. i want to be able to instantiate a class and then enumerate the variables and variable types that make up the class. For example:
myClass:
Possible? can it be done using reflection? i really like using classes but i suppose i could move it into a map or keyvaluestore in needed.
**edit**
basically something like listing 3 in this link http://www.ibm.com/developerworks/library/j-dyn0603/
myClass:
B4X:
Sub Class_Globals
private v_i as int
End sub
Sub seti(e as int)
v_i = e
End sub
Sub geti as int
return v_i
end sub
B4X:
Sub Enumerate
dim c as myClass
'this is what i want to do next
for each variable in c
log(variable.name & ":" & variable.type) 'or something similar
next
end sub
Possible? can it be done using reflection? i really like using classes but i suppose i could move it into a map or keyvaluestore in needed.
**edit**
basically something like listing 3 in this link http://www.ibm.com/developerworks/library/j-dyn0603/
Last edited: