Ejemplo n.º 1
0
 public <T extends Anim> void clearanims(Class<T> type) {
   for (Iterator<Anim> i = nanims.iterator(); i.hasNext(); ) {
     Anim a = i.next();
     if (type.isInstance(a)) i.remove();
   }
   for (Iterator<Anim> i = anims.iterator(); i.hasNext(); ) {
     Anim a = i.next();
     if (type.isInstance(a)) i.remove();
   }
 }
Ejemplo n.º 2
0
 @Deprecated
 public <T extends Widget> T findchild(Class<T> cl) {
   for (Widget wdg = child; wdg != null; wdg = wdg.next) {
     if (cl.isInstance(wdg)) return (cl.cast(wdg));
     T ret = wdg.findchild(cl);
     if (ret != null) return (ret);
   }
   return (null);
 }
Ejemplo n.º 3
0
 static boolean hasInstance(Object[] array, Class<? extends Annotation>... cs) {
   for (Object o : array) {
     for (Class<?> c : cs) {
       if (c.isInstance(o)) {
         return true;
       }
     }
   }
   return false;
 }
Ejemplo n.º 4
0
 public <T extends Widget> T getparent(Class<T> cl) {
   for (Widget w = this; w != null; w = w.parent) {
     if (cl.isInstance(w)) return (cl.cast(w));
   }
   return (null);
 }