/** @note do not call Init method directly */
  public static boolean Init(
      StarServiceClass In_Service, StarSrvGroupClass In_SrvGroup, boolean In_DumpInformationFlag) {
    final StarSrvGroupClass SrvGroup = In_SrvGroup;
    final StarServiceClass Service = In_Service;
    final boolean DumpInformationFlag = In_DumpInformationFlag;
    WrapAndroidClass.DumpInformation(SrvGroup, DumpInformationFlag, "init OvalShapeClass");

    /* OvalShapeClass Body */
    Service._GetObject("OvalShapeClass")
        ._Assign(
            new StarObjectClass() {
              /* onCreateAndroid function */
              public void onCreateAndroid(StarObjectClass self) {
                StarObjectClass parent = (StarObjectClass) self._Get("_Parent");
                StarObjectClass activity = (StarObjectClass) self._Call("getActivity");
                StarCLEOvalShape ovalshape =
                    new StarCLEOvalShape(
                        (Activity) WrapAndroidClass.GetAndroidObject(activity, "AndroidObject"),
                        self);
                WrapAndroidClass.SetAndroidObject(self, "AndroidObject", (Object) ovalshape);
                return;
              }
              /**
               * <div class="memproto">
               *
               * <table class="memname">
               *     <tr><td class="memname">public void  draw(StarObjectClass self,StarObjectClass canvas,StarObjectClass paint) </td></tr>
               *   </table>
               *
               * </div>
               */
              public void draw(
                  StarObjectClass self, StarObjectClass canvas, StarObjectClass paint) {
                StarCLEOvalShape ovalshape =
                    (StarCLEOvalShape) WrapAndroidClass.GetAndroidObject(self, "AndroidObject");
                StarCLECanvas star_canvas =
                    (StarCLECanvas) WrapAndroidClass.GetAndroidObject(canvas, "AndroidObject");
                if (ovalshape != null && ovalshape.GetAndroidObject() != null) {
                  if (paint != null) {
                    StarCLEPaint star_paint =
                        (StarCLEPaint) WrapAndroidClass.GetAndroidObject(paint, "AndroidObject");
                    ((RectShape) ovalshape.GetAndroidObject())
                        .draw(
                            (Canvas) star_canvas.GetAndroidObject(),
                            (Paint) star_paint.GetAndroidObject());
                  } else
                    ((RectShape) ovalshape.GetAndroidObject())
                        .draw((Canvas) star_canvas.GetAndroidObject(), null);
                }
              }
            });

    return true;
  }
 @Override
 public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
   StarObjectClass self = BasicAndroidObject.getStarObject();
   StarServiceClass Service = (StarServiceClass) self._Get("_Service");
   StarObjectClass definedclass = self._DefinedClass("onFling");
   StarObjectClass basicclass = Service._GetObject("GalleryClass");
   if (definedclass._GetStr("_ID").equals(basicclass._GetStr("_ID")))
     return super.onFling(e1, e2, velocityX, velocityY);
   if (motionevent1 == null) motionevent1 = Service._GetObject("MotionEventClass")._New();
   StarCLEMotionEvent star_motionevent1 =
       (StarCLEMotionEvent) WrapAndroidClass.GetAndroidObject(motionevent1, "AndroidObject");
   star_motionevent1.motionevent = e1;
   if (motionevent2 == null) motionevent2 = Service._GetObject("MotionEventClass")._New();
   StarCLEMotionEvent star_motionevent2 =
       (StarCLEMotionEvent) WrapAndroidClass.GetAndroidObject(motionevent2, "AndroidObject");
   star_motionevent2.motionevent = e2;
   boolean Result =
       self._Tobool(self._Call("onFling", motionevent1, motionevent2, velocityX, velocityY));
   star_motionevent1.motionevent = null;
   star_motionevent2.motionevent = null;
   return Result;
 }
 /*------------------------override functions------------------------------*/
 @Override
 public boolean onDown(MotionEvent e) {
   StarObjectClass self = BasicAndroidObject.getStarObject();
   StarServiceClass Service = (StarServiceClass) self._Get("_Service");
   StarObjectClass definedclass = self._DefinedClass("onDown");
   StarObjectClass basicclass = Service._GetObject("GalleryClass");
   if (definedclass._GetStr("_ID").equals(basicclass._GetStr("_ID"))) return super.onDown(e);
   if (motionevent1 == null) motionevent1 = Service._GetObject("MotionEventClass")._New();
   StarCLEMotionEvent star_motionevent1 =
       (StarCLEMotionEvent) WrapAndroidClass.GetAndroidObject(motionevent1, "AndroidObject");
   star_motionevent1.motionevent = e;
   boolean Result = self._Tobool(self._Call("onDown", motionevent1));
   star_motionevent1.motionevent = null;
   return Result;
 }
 @Override
 public void onShowPress(MotionEvent e) {
   StarObjectClass self = BasicAndroidObject.getStarObject();
   StarServiceClass Service = (StarServiceClass) self._Get("_Service");
   StarObjectClass definedclass = self._DefinedClass("onShowPress");
   StarObjectClass basicclass = Service._GetObject("GalleryClass");
   if (definedclass._GetStr("_ID").equals(basicclass._GetStr("_ID"))) {
     super.onShowPress(e);
     return;
   }
   if (motionevent1 == null) motionevent1 = Service._GetObject("MotionEventClass")._New();
   StarCLEMotionEvent star_motionevent1 =
       (StarCLEMotionEvent) WrapAndroidClass.GetAndroidObject(motionevent1, "AndroidObject");
   star_motionevent1.motionevent = e;
   self._Call("onShowPress", motionevent1);
   star_motionevent1.motionevent = null;
   return;
 }
  /** @note do not call Init method directly */
  public static boolean Init(
      StarServiceClass In_Service, StarSrvGroupClass In_SrvGroup, boolean In_DumpInformationFlag) {
    final StarSrvGroupClass SrvGroup = In_SrvGroup;
    final StarServiceClass Service = In_Service;
    final boolean DumpInformationFlag = In_DumpInformationFlag;
    WrapAndroidClass.DumpInformation(
        SrvGroup, DumpInformationFlag, "init AutoCompleteTextViewClass");

    class StarCLEAutoCompleteTextView extends AutoCompleteTextView
        implements BasicAndroidInterface {
      private BasicAndroidClass BasicAndroidObject;
      private List<Object> RefList;

      public StarCLEAutoCompleteTextView(Context ctx, StarObjectClass In_Object) {
        super(ctx);
        BasicAndroidObject = new BasicAndroidClass();
        BasicAndroidObject.setStarObject(In_Object);
        RefList = new ArrayList<Object>();
      }

      public BasicAndroidClass getBasicAndroid() {
        return BasicAndroidObject;
      };

      public Object GetAndroidObject() {
        return this;
      }

      public void SetAndroidObject(Object object) {
        SrvGroup._PrintError(1, "AutoCompleteTextViewClass not support SetAndroidObject");
      }

      public void AddRef(Object object) {
        RefList.add(object);
      }

      public void DelRef(Object object) {
        RefList.remove(object);
      }

      protected void finalize() {
        StarObjectClass starobject = BasicAndroidObject.getStarObject();
        if (starobject != null) starobject._Free();
      }
    }

    /* AutoCompleteTextViewClass Body */
    Service._GetObject("AutoCompleteTextViewClass")
        ._Assign(
            new StarObjectClass() {
              /* onCreateAndroid function */
              public void onCreateAndroid(StarObjectClass self) {
                StarObjectClass parent = (StarObjectClass) self._Get("_Parent");
                StarObjectClass activity = (StarObjectClass) self._Call("getActivity");
                StarCLEAutoCompleteTextView view =
                    new StarCLEAutoCompleteTextView(
                        (Activity) WrapAndroidClass.GetAndroidObject(activity, "AndroidObject"),
                        self);
                WrapAndroidClass.SetAndroidObject(self, "AndroidObject", (Object) view);
                if (parent != null) {
                  if (activity == parent) {
                    Activity android_activity =
                        (Activity) WrapAndroidClass.GetAndroidObject(parent, "AndroidObject");
                    android_activity.setContentView(view);
                  } else {
                    ViewGroup android_viewgroup =
                        (ViewGroup) WrapAndroidClass.GetAndroidObject(parent, "AndroidObject");
                    android_viewgroup.addView(view);
                  }
                  self._LockGC();
                  self._Call("decAndroidRef"); // release with parent
                }
                return;
              }
              /**
               * <div class="memproto">
               *
               * <table class="memname">
               *     <tr><td class="memname">public void setNumColumns(StarObjectClass self,int numColumns) </td></tr>
               *   </table>
               *
               * </div>
               */
              public void setThreshold(StarObjectClass self, int threshold) {
                StarObjectClass activity = (StarObjectClass) self._Call("getActivity");
                StarObjectClass parent = (StarObjectClass) self._Get("_Parent");
                if (parent != null && parent == activity) return; // may be content view
                AutoCompleteTextView view =
                    (AutoCompleteTextView) WrapAndroidClass.GetAndroidObject(self, "AndroidObject");
                if (view != null) view.setThreshold(threshold);
              }
              /**
               * <div class="memproto">
               *
               * <table class="memname">
               *     <tr><td class="memname">public void setAdapter(StarObjectClass self,StarObjectClass adapter) </td></tr>
               *   </table>
               *
               * </div>
               */
              public void setAdapter(StarObjectClass self, StarObjectClass adapter) {
                AutoCompleteTextView adapterview =
                    (AutoCompleteTextView) WrapAndroidClass.GetAndroidObject(self, "AndroidObject");
                if (adapterview == null) return;
                ArrayAdapter<String> android_adapter =
                    (ArrayAdapter<String>)
                        WrapAndroidClass.GetAndroidObject(adapter, "AndroidObject");
                if (android_adapter == null) return;
                adapter._LockGC();
                adapterview.setAdapter(android_adapter);
                adapter._Call("decAndroidRef"); // adapter release with parent
              }
            });

    return true;
  }