Determine if {@code this} is a an implicit subtype of {@code superType}.
499330
final boolean isStructuralSubtype(ObjectType superType,
      ImplCache implicitImplCache, SubtypingMode subtypingMode) {
    // Union types should be handled by isSubtype already
    checkArgument(!this.isUnionType());
    checkArgument(!superType.isUnionType());
    Preconditions.checkArgument(superType.isStructuralType(),
        "isStructuralSubtype should be called with structural supertype. Found %s", superType);

    MatchStatus cachedResult = implicitImplCache.checkCache(this, superType);
    if (cachedResult != null) {
      return cachedResult.subtypeValue();
    }

    boolean result =
        isStructuralSubtypeHelper(
            this, superType, implicitImplCache, subtypingMode, VOIDABLE_PROPS_ARE_OPTIONAL);
    return implicitImplCache.updateCache(this, superType, MatchStatus.valueOf(result));
  }
821176
public boolean isType(final org.efaps.admin.datamodel.Type _type)
    {
        return getType().equals(_type);
    }
10561
@NonNull
	public static ResolvedType resolveSubtype(@NonNull ResolvedType superType, @NonNull Class<?> subType)
	{
		return typeResolver.resolveSubtype(superType, subType);
	}
1337540
public static boolean isInner(final Type type) {
        if (type instanceof ParameterizedType) {
            return ((ParameterizedType) type).getOwnerType() != null;
        }
        final Class<?> actual = GenericsUtils.resolveClassIgnoringVariables(type);
        // interface is always static and can't use outer generics
        return !actual.isInterface() && actual.isMemberClass() && !Modifier.isStatic(actual.getModifiers());
    }
1280565
public static boolean isSupportedType(final Class<?> clazz) {
        if (ReflectionUtils.isPropertyType(clazz)) {
            return true;
        }
        if (clazz.isArray() || Map.class.isAssignableFrom(clazz) || Iterable.class.isAssignableFrom(clazz)) {
            Class<?> subType;
            if (clazz.isArray()) {
                subType = clazz.getComponentType();
            } else {
                subType = ReflectionUtils.getParameterizedClass(clazz);
            }

            //get component type, String.class from List<String>
            if (subType != null && subType != Object.class && !ReflectionUtils.isPropertyType(subType)) {
                return false;
            }

            //either no componentType or it is an allowed type
            return true;
        }
        return false;
    }
904736
public boolean isBaseTypeOf(ModelElementType elementType) {
    if (this.equals(elementType)) {
      return true;
    }
    else {
      Collection<ModelElementType> baseTypes = ModelUtil.calculateAllBaseTypes(elementType);
      return baseTypes.contains(this);
    }
  }
668243
private static boolean containsTypeVariables(final Type type) {
        if (type instanceof TypeVariable<?>) {
            return true;
        }
        if (type instanceof Class<?>) {
            return ((Class<?>) type).getTypeParameters().length > 0;
        }
        if (type instanceof ParameterizedType) {
            for (final Type arg : ((ParameterizedType) type).getActualTypeArguments()) {
                if (containsTypeVariables(arg)) {
                    return true;
                }
            }
            return false;
        }
        if (type instanceof WildcardType) {
            final WildcardType wild = (WildcardType) type;
            return containsTypeVariables(TypeUtils.getImplicitLowerBounds(wild)[0])
                    || containsTypeVariables(TypeUtils.getImplicitUpperBounds(wild)[0]);
        }
        return false;
    }
868243
public boolean isSubClassOf(final OClass iClass) {
    if (iClass == null)
      return false;

    OClass cls = this;
    while (cls != null) {
      if (cls.getName().equals(iClass.getName()))
        return true;
      cls = cls.getSuperClass();
    }
    return false;
  }
299988
public final static boolean isClassType(final Type type) {
        if (type instanceof Class) return true;
        if (type instanceof WildcardType) return false;
        if (type instanceof TypeVariable) return false;
        if (type instanceof GenericArrayType) return isClassType(((GenericArrayType) type).getGenericComponentType());
        if (!(type instanceof ParameterizedType)) return false; //只能是null了
        final ParameterizedType ptype = (ParameterizedType) type;
        if (ptype.getOwnerType() != null && !isClassType(ptype.getOwnerType())) return false;
        if (!isClassType(ptype.getRawType())) return false;
        for (Type t : ptype.getActualTypeArguments()) {
            if (!isClassType(t)) return false;
        }
        return true;
    }
820418
def is_enum_type(type_):
    

    return isinstance(type_, type) and issubclass(type_, tuple(_get_types(Types.ENUM)))
698199
public static boolean isAssignableFrom(Type a, Type b) {
    if (a instanceof Class<?>) {
      Class<?> classA = (Class<?>) a;
      if (b instanceof Class<?>) {
        return classA.isAssignableFrom((Class<?>) b);
      } else if (b instanceof GenericArrayType) {
        return classA.isArray() && isAssignableFrom(
            classA.getComponentType(), ((GenericArrayType) b).getGenericComponentType());
      } else if (b instanceof ParameterizedType) {
        return classA.isAssignableFrom((Class<?>) ((ParameterizedType) b).getRawType());
      } else if (b instanceof TypeVariable<?>) {
        TypeVariable<?> typeVariableB = (TypeVariable<?>) b;
        for (Type upperBound : typeVariableB.getBounds()) {
          if (!isAssignableFrom(a, upperBound)) {
            return false;
          }
        }
        return true;
      } else if (b instanceof WildcardType) {
        WildcardType wildcardTypeB = (WildcardType) b;
        for (Type upperBound : wildcardTypeB.getUpperBounds()) {
          if (!isAssignableFrom(a, upperBound)) {
            return false;
          }
        }
        return true;
      }
    } else if (a instanceof GenericArrayType) {
      if (b instanceof GenericArrayType) {
        return isAssignableFrom(
            ((GenericArrayType) a).getGenericComponentType(),
            ((GenericArrayType) b).getGenericComponentType());
      }
    } else if (a instanceof ParameterizedType) {
      ParameterizedType parameterizedTypeA = (ParameterizedType) a;
      if (b instanceof Class<?>) {
        return isAssignableFrom(parameterizedTypeA.getRawType(), b);
      } else if (b instanceof ParameterizedType) {
        ParameterizedType parameterizedTypeB = (ParameterizedType) b;
        Type[] actualTypeArgumentsA = parameterizedTypeA.getActualTypeArguments();
        Type[] actualTypeArgumentsB = parameterizedTypeB.getActualTypeArguments();
        if (actualTypeArgumentsA.length != actualTypeArgumentsB.length) {
          return false;
        }
        for (int i = 0; i < actualTypeArgumentsA.length; i++) {
          if (!isInstance(actualTypeArgumentsA[i], actualTypeArgumentsB[i])) {
            return false;
          }
        }
        return isAssignableFrom(
            parameterizedTypeA.getRawType(),
            parameterizedTypeB.getRawType());
      }
    } else if (a instanceof TypeVariable<?>) {
      for (Type bound : ((TypeVariable<?>) a).getBounds()) {
        if (!isAssignableFrom(bound, b)) {
          return false;
        }
      }
      return true;
    } else if (a instanceof WildcardType) {
      WildcardType wildcardType = (WildcardType) a;
      Type[] lowerBounds = wildcardType.getLowerBounds();
      for (Type lowerBound : lowerBounds) {
        if (!isAssignableFrom(lowerBound, b)) {
          return false;
        }
      }
      return lowerBounds.length != 0;
    }
    return false;
  }
778173
private boolean containerOfSubtyping(
      Set<String> containerTypeParameters,
      AnnotationInfo annotation,
      TypeVariableSymbol typaram,
      Type tyargument) {
    // (1)
    if (!tyargument.hasTag(TypeTag.TYPEVAR)) {
      return false;
    }
    // (2)
    if (!containerTypeParameters.contains(tyargument.asElement().getSimpleName().toString())
        || isTypeParameterThreadSafe(
            (TypeVariableSymbol) tyargument.asElement(), containerTypeParameters)) {
      return false;
    }
    // (3)
    if (annotation.containerOf().contains(typaram.getSimpleName().toString())) {
      return false;
    }
    return true;
  }
129877
public static boolean isSubtype(ReferenceType t, ReferenceType possibleSupertype) throws ClassNotFoundException {
        return Global.getAnalysisCache().getDatabase(Subtypes2.class).isSubtype(t, possibleSupertype);
    }
1244071
private static boolean isAssignableFrom(TypeVariable<?> type1, TypeVariable<?> type2) {
        if (type1.equals(type2)) {
            return true;
        }
        // if a type variable extends another type variable, it cannot declare other bounds
        if (type2.getBounds()[0] instanceof TypeVariable<?>) {
            return isAssignableFrom(type1, (TypeVariable<?>) type2.getBounds()[0]);
        }
        return false;
    }
71115
@Override
  public boolean isUnknownType() {
    // If the object is unknown now, check the supertype again,
    // because it might have been resolved since the last check.
    if (unknown) {
      ObjectType implicitProto = getImplicitPrototype();
      if (implicitProto == null || implicitProto.isNativeObjectType()) {
        unknown = false;
        for (ObjectType interfaceType : getCtorExtendedInterfaces()) {
          if (interfaceType.isUnknownType()) {
            unknown = true;
            break;
          }
        }
      } else {
        unknown = implicitProto.isUnknownType();
      }
    }
    return unknown;
  }
393185
protected boolean isSubtypeButNotSynonym(LightweightTypeReference expectation, Class<?> clazz) {
		if (expectation.isType(clazz)) {
			return true;
		}
		ITypeReferenceOwner owner = expectation.getOwner();
		JvmType declaredType = owner.getServices().getTypeReferences().findDeclaredType(clazz, owner.getContextResourceSet());
		if (declaredType == null) {
			return false;
		}
		LightweightTypeReference superType = owner.newParameterizedTypeReference(declaredType);
		// don't allow synonyms, e.g. Iterable is not considered to be a supertype of Functions.Function0
		boolean result = superType.isAssignableFrom(expectation.getRawTypeReference(), 
				new TypeConformanceComputationArgument(false, false, true, true, false, false));
		return result;
	}
252966
static boolean isIThenableSubtype(JSType type) {
    if (type.isTemplatizedType()) {
      TemplatizedType ttype = type.toMaybeTemplatizedType();
      return ttype.getTemplateTypeMap().hasTemplateKey(ttype.registry.getThenableValueKey());
    }
    return false;
  }