isAssignableFrom() private méthode

private isAssignableFrom ( global par0 ) : bool
par0 global
Résultat bool
 public virtual bool producesType(Class type)
 {
   return this.getParameterTypes().Length == 0 && type.isAssignableFrom(this.fMethod.getReturnType());
 }
Exemple #2
0
 public virtual void getEntitiesOfTypeWithinAAAB(Class class1, AxisAlignedBB axisalignedbb, List list)
 {
     int i = MathHelper.floor_double((axisalignedbb.minY - 2D)/16D);
     int j = MathHelper.floor_double((axisalignedbb.maxY + 2D)/16D);
     if (i < 0)
     {
         i = 0;
     }
     if (j >= entities.Length)
     {
         j = entities.Length - 1;
     }
     for (int k = i; k <= j; k++)
     {
         List list1 = entities[k];
         for (int l = 0; l < list1.size(); l++)
         {
             var entity = (Entity) list1.get(l);
             if (class1.isAssignableFrom(entity.GetType()) && entity.boundingBox.intersectsWith(axisalignedbb))
             {
                 list.add(entity);
             }
         }
     }
 }
Exemple #3
0
        public virtual int countEntities(Class class1)
        {
            int i = 0;
            for (int j = 0; j < loadedEntityList.size(); j++)
            {
                var entity = (Entity) loadedEntityList.get(j);
                if (class1.isAssignableFrom(entity.GetType()))
                {
                    i++;
                }
            }

            return i;
        }
    public static object loadAndInstantiate(string className, Class source, Class type)
    {
      object obj;
      try
      {
        Class @class = ObjectUtilities.getClassLoader(source).loadClass(className);
        if (type.isAssignableFrom(@class))
          obj = @class.newInstance(ObjectUtilities.__\u003CGetCallerID\u003E());
        else
          goto label_6;
      }
      catch (Exception ex)
      {
        int num = 2;
        if (ByteCodeHelper.MapException<Exception>(ex, (ByteCodeHelper.MapFlags) num) == null)
          throw;
        else
          goto label_5;
      }
      return obj;
label_5:
      return (object) null;
label_6:
      return (object) null;
    }