package b4j.example;


import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.B4AClass;
import anywheresoftware.b4a.debug.*;

public class person extends B4AClass.ImplB4AClass implements BA.SubDelegator{
    public static java.util.HashMap<String, java.lang.reflect.Method> htSubs;
    private void innerInitialize(BA _ba) throws Exception {
        if (ba == null) {
            ba = new  anywheresoftware.b4a.ShellBA("b4j.example", "b4j.example.person", this);
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            ba.htSubs = htSubs;
             
        }
        if (BA.isShellModeRuntimeCheck(ba))
                this.getClass().getMethod("_class_globals", b4j.example.person.class).invoke(this, new Object[] {null});
        else
            ba.raiseEvent2(null, true, "class_globals", false);
    }

 
    public void  innerInitializeHelper(anywheresoftware.b4a.BA _ba) throws Exception{
        innerInitialize(_ba);
    }
    public Object callSub(String sub, Object sender, Object[] args) throws Exception {
        return BA.SubDelegator.SubNotFound;
    }
public anywheresoftware.b4a.keywords.Common __c = null;
public anywheresoftware.b4j.objects.JFX _fx = null;
public String _mfirstname = "";
public String _mlastname = "";
public long _mbirthdate = 0L;
public b4j.example.main _main = null;
public String  _initialize(b4j.example.person __ref,anywheresoftware.b4a.BA _ba,String _firstname,String _lastname,long _birthdate) throws Exception{
__ref = this;
innerInitialize(_ba);
RDebugUtils.currentModule="person";
if (Debug.shouldDelegate(ba, "initialize"))
	return (String) Debug.delegate(ba, "initialize", new Object[] {_ba,_firstname,_lastname,_birthdate});
RDebugUtils.currentLine=196608;
 //BA.debugLineNum = 196608;BA.debugLine="Sub Initialize (FirstName As String, LastName As S";
RDebugUtils.currentLine=196609;
 //BA.debugLineNum = 196609;BA.debugLine="mFirstName = FirstName";
__ref._mfirstname = _firstname;
RDebugUtils.currentLine=196610;
 //BA.debugLineNum = 196610;BA.debugLine="mLastName = LastName";
__ref._mlastname = _lastname;
RDebugUtils.currentLine=196611;
 //BA.debugLineNum = 196611;BA.debugLine="mBirthDate = BirthDate";
__ref._mbirthdate = _birthdate;
RDebugUtils.currentLine=196612;
 //BA.debugLineNum = 196612;BA.debugLine="End Sub";
return "";
}
public int  _getcurrentage(b4j.example.person __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="person";
if (Debug.shouldDelegate(ba, "getcurrentage"))
	return (Integer) Debug.delegate(ba, "getcurrentage", null);
RDebugUtils.currentLine=327680;
 //BA.debugLineNum = 327680;BA.debugLine="Public Sub GetCurrentAge As Int";
RDebugUtils.currentLine=327681;
 //BA.debugLineNum = 327681;BA.debugLine="Return GetAgeAt(DateTime.Now)";
if (true) return __ref._getageat(null,__c.DateTime.getNow());
RDebugUtils.currentLine=327682;
 //BA.debugLineNum = 327682;BA.debugLine="End Sub";
return 0;
}
public String  _class_globals(b4j.example.person __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="person";
RDebugUtils.currentLine=131072;
 //BA.debugLineNum = 131072;BA.debugLine="Sub Class_Globals";
RDebugUtils.currentLine=131073;
 //BA.debugLineNum = 131073;BA.debugLine="Private fx As JFX";
_fx = new anywheresoftware.b4j.objects.JFX();
RDebugUtils.currentLine=131074;
 //BA.debugLineNum = 131074;BA.debugLine="Private mFirstName, mLastName As String";
_mfirstname = "";
_mlastname = "";
RDebugUtils.currentLine=131075;
 //BA.debugLineNum = 131075;BA.debugLine="Private mBirthDate As Long";
_mbirthdate = 0L;
RDebugUtils.currentLine=131076;
 //BA.debugLineNum = 131076;BA.debugLine="End Sub";
return "";
}
public int  _getageat(b4j.example.person __ref,long _date) throws Exception{
__ref = this;
RDebugUtils.currentModule="person";
if (Debug.shouldDelegate(ba, "getageat"))
	return (Integer) Debug.delegate(ba, "getageat", new Object[] {_date});
long _diff = 0L;
RDebugUtils.currentLine=393216;
 //BA.debugLineNum = 393216;BA.debugLine="Public Sub GetAgeAt(Date As Long) As Int";
RDebugUtils.currentLine=393217;
 //BA.debugLineNum = 393217;BA.debugLine="Dim diff As Long";
_diff = 0L;
RDebugUtils.currentLine=393218;
 //BA.debugLineNum = 393218;BA.debugLine="diff = Date - mBirthDate";
_diff = (long) (_date-__ref._mbirthdate);
RDebugUtils.currentLine=393219;
 //BA.debugLineNum = 393219;BA.debugLine="Return Floor(diff / DateTime.TicksPerDay / 365)";
if (true) return (int) (__c.Floor(_diff/(double)__c.DateTime.TicksPerDay/(double)365));
RDebugUtils.currentLine=393220;
 //BA.debugLineNum = 393220;BA.debugLine="End Sub";
return 0;
}
public String  _getname(b4j.example.person __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="person";
if (Debug.shouldDelegate(ba, "getname"))
	return (String) Debug.delegate(ba, "getname", null);
RDebugUtils.currentLine=262144;
 //BA.debugLineNum = 262144;BA.debugLine="Public Sub GetName As String";
RDebugUtils.currentLine=262145;
 //BA.debugLineNum = 262145;BA.debugLine="Return mFirstName & \" \" & mLastName";
if (true) return __ref._mfirstname+" "+__ref._mlastname;
RDebugUtils.currentLine=262146;
 //BA.debugLineNum = 262146;BA.debugLine="End Sub";
return "";
}
}