Sub Activity_Create(FirstTime As Boolean)
Dim methods As Map = GetMethods("starter")
For Each k As String In methods.Keys
Log(k)
Next
End Sub
Sub GetMethods(clsName As String) As Map
Dim jo As JavaObject
Dim cls As String = Application.PackageName & "." & clsName.ToLowerCase
jo.InitializeStatic(cls)
Try
jo.RunMethod("NA", Null) 'ignore the error message in the logs
Catch
End Try 'ignore
Dim r As Reflector
r.Target = r.GetStaticField("anywheresoftware.b4j.object.JavaObject", "methodCache")
Dim jo As JavaObject = r.GetField("cache")
jo = jo.RunMethod("get", Array(cls))
Dim m As Map
m.Initialize
Dim mm As JavaObject = m
mm.RunMethod("putAll", Array(jo))
Dim m2 As Map
m2.Initialize
For Each k As String In m.Keys
If k.StartsWith("_") Then
m2.Put(k.SubString(1), m.Get(k))
End If
Next
Return m2
End Sub