示例#1
0
 /*
  * Enabled aggressive block sorting
  */
 private static boolean isAssignableFrom(Type class_, GenericArrayType genericArrayType) {
     void var1_4;
     Type type = genericArrayType.getGenericComponentType();
     if (!(type instanceof ParameterizedType)) return true;
     Class class_2 = class_;
     if (class_ instanceof GenericArrayType) {
         Type type2 = ((GenericArrayType)((Object)class_)).getGenericComponentType();
         return TypeToken.isAssignableFrom((Type)var1_4, (ParameterizedType)type, new HashMap<String, Type>());
     }
     if (!(class_ instanceof Class)) return TypeToken.isAssignableFrom((Type)var1_4, (ParameterizedType)type, new HashMap<String, Type>());
     do {
         if (!class_.isArray()) {
             Class class_3 = class_;
             return TypeToken.isAssignableFrom((Type)var1_4, (ParameterizedType)type, new HashMap<String, Type>());
         }
         class_ = class_.getComponentType();
     } while (true);
 }
示例#2
0
 /*
  * Enabled force condition propagation
  * Lifted jumps to return sites
  */
 @Deprecated
 public boolean isAssignableFrom(Type type) {
     if (type == null) {
         return false;
     }
     if (this.type.equals(type)) {
         return true;
     }
     if (this.type instanceof Class) {
         return this.rawType.isAssignableFrom($Gson$Types.getRawType(type));
     }
     if (this.type instanceof ParameterizedType) {
         return TypeToken.isAssignableFrom(type, (ParameterizedType)this.type, new HashMap<String, Type>());
     }
     if (!(this.type instanceof GenericArrayType)) throw TypeToken.buildUnexpectedTypeError(this.type, Class.class, ParameterizedType.class, GenericArrayType.class);
     if (!this.rawType.isAssignableFrom($Gson$Types.getRawType(type))) return false;
     if (!TypeToken.isAssignableFrom(type, (GenericArrayType)this.type)) return false;
     return true;
 }
示例#3
0
 private static boolean isAssignableFrom(Type object, ParameterizedType parameterizedType, Map<String, Type> map) {
     int n2;
     if (object == null) {
         return false;
     }
     if (parameterizedType.equals(object)) {
         return true;
     }
     Class class_ = $Gson$Types.getRawType((Type)object);
     ParameterizedType parameterizedType2 = null;
     if (object instanceof ParameterizedType) {
         parameterizedType2 = (ParameterizedType)object;
     }
     if (parameterizedType2 != null) {
         Type[] arrtype = parameterizedType2.getActualTypeArguments();
         TypeVariable<Class<?>>[] arrtypeVariable = class_.getTypeParameters();
         for (n2 = 0; n2 < arrtype.length; ++n2) {
             object = arrtype[n2];
             TypeVariable typeVariable = arrtypeVariable[n2];
             while (object instanceof TypeVariable) {
                 object = map.get(((TypeVariable)object).getName());
             }
             map.put(typeVariable.getName(), (Type)object);
         }
         if (TypeToken.typeEquals(parameterizedType2, parameterizedType, map)) {
             return true;
         }
     }
     object = class_.getGenericInterfaces();
     int n3 = object.length;
     for (n2 = 0; n2 < n3; ++n2) {
         if (!TypeToken.isAssignableFrom(object[n2], parameterizedType, new HashMap<String, Type>(map))) continue;
         return true;
     }
     return TypeToken.isAssignableFrom(class_.getGenericSuperclass(), parameterizedType, new HashMap<String, Type>(map));
 }