Return true if the argument is a ModuleLayer or a subclass of ModuleLayer.

@param moduleLayer
the module layer
@return true if the argument is a ModuleLayer or a subclass of ModuleLayer.
763473
private static boolean isModuleLayer(final Object moduleLayer) {
        if (moduleLayer == null) {
            throw new IllegalArgumentException("ModuleLayer references must not be null");
        }
        for (Class<?> currClass = moduleLayer.getClass(); currClass != null; currClass = currClass
                .getSuperclass()) {
            if (currClass.getName().equals("java.lang.ModuleLayer")) {
                return true;
            }
        }
        return false;
    }
1296569
private boolean isSupportedCallType(Node callNode) {
    if (!callNode.getFirstChild().isName()) {
      if (NodeUtil.isFunctionObjectCall(callNode)) {
        if (!assumeStrictThis) {
          Node thisValue = callNode.getSecondChild();
          if (thisValue == null || !thisValue.isThis()) {
            return false;
          }
        }
      } else if (NodeUtil.isFunctionObjectApply(callNode)) {
        return false;
      }
    }

    return true;
  }
489166
@SuppressWarnings("SimplifiableIfStatement")
    public boolean isSubTypeOf(Type maybeSubType, Type superType) {
        TypeInfo maybeSubTypeInfo = TypeInfo.typeInfo(maybeSubType);
        TypeInfo superTypeInfo = TypeInfo.typeInfo(superType);
        // Equivalent type is a valid subtype
        if (maybeSubTypeInfo.equals(superTypeInfo)) {
            return true;
        }


        // If superType is non-null, maybeSubType must also be non-null.
        if (superTypeInfo.isNonNull()) {
            if (maybeSubTypeInfo.isNonNull()) {
                return isSubTypeOf(maybeSubTypeInfo.unwrapOneType(), superTypeInfo.unwrapOneType());
            }
            return false;
        }
        if (maybeSubTypeInfo.isNonNull()) {
            // If superType is nullable, maybeSubType may be non-null or nullable.
            return isSubTypeOf(maybeSubTypeInfo.unwrapOneType(), superType);
        }

        // If superType type is a list, maybeSubType type must also be a list.
        if (superTypeInfo.isList()) {
            if (maybeSubTypeInfo.isList()) {
                return isSubTypeOf(maybeSubTypeInfo.unwrapOneType(), superTypeInfo.unwrapOneType());
            }
            return false;
        }
        if (maybeSubTypeInfo.isList()) {
            // If superType is not a list, maybeSubType must also be not a list.
            return false;
        }

        // If superType type is an abstract type, maybeSubType type may be a currently
        // possible object type.
        if (isInterfaceOrUnion(superType) &&
                isObjectType(maybeSubType) &&
                isPossibleType(superType, maybeSubType)) {
            return true;
        }

        // Otherwise, the child type is not a valid subtype of the parent type.
        return false;
    }
641159
public static boolean checkCompatibleModuleResources(CmsModule installedModule, CmsModule newModule) {

        if (!(installedModule.hasOnlySystemAndSharedResources() && newModule.hasOnlySystemAndSharedResources())) {
            String oldSite = installedModule.getSite();
            String newSite = newModule.getSite();
            if (!((oldSite != null) && (newSite != null) && CmsStringUtil.comparePaths(oldSite, newSite))) {
                return false;
            }

        }
        for (String oldModRes : installedModule.getResources()) {
            for (String newModRes : newModule.getResources()) {
                if (CmsStringUtil.isProperPrefixPath(oldModRes, newModRes)) {
                    return false;
                }
            }
        }
        return true;

    }
951173
public boolean isIncluded() {
        if (isIncluded) {
            return true;
        }
        if (env.shouldDocument(tsym)) {
            // Class is nameable from top-level and
            // the class and all enclosing classes
            // pass the modifier filter.
            if (containingPackage().isIncluded()) {
                return isIncluded=true;
            }
            ClassDoc outer = containingClass();
            if (outer != null && outer.isIncluded()) {
                return isIncluded=true;
            }
        }
        return false;
    }
683772
public static boolean isInstaneOf(Class src, Class trg) {
	if (src.isArray() && trg.isArray()) {
	    return isInstaneOf(src.getComponentType(), trg.getComponentType());
	}

	if (src == trg) return true;

	// Interface
	if (trg.isInterface()) {
	    return _checkInterfaces(src, trg);
	}
	// Extends

	while (src != null) {
	    if (src == trg) return true;
	    src = src.getSuperclass();
	}
	return trg == Object.class;
    }
494441
def is_module(obj):
    
    return True if obj and isinstance(obj, ModuleType) or inspect.isclass(obj) else False
1204236
protected boolean isRootContainer(CmsContainer container) {

        boolean isRoot = false;
        if (!container.isSubContainer()) {
            isRoot = true;
        } else if (container.isDetailOnly()) {
            CmsContainer parent = getContainer(container.getParentContainerName());
            isRoot = (parent != null) && !parent.isDetailOnly();
        }
        return isRoot;
    }
528899
public boolean isUnderTag(String superTagName, String subTagName)
    {
        if (superTagName == null || subTagName == null)
            throw new IllegalArgumentException("Looking for a null tag name.");

        superTagName = Tag.normalizeName(superTagName);
        subTagName = Tag.normalizeName(subTagName);

        if (superTagName.equals(subTagName))
            return false;

        final Tag superTag = this.findTag(superTagName);
        final Tag subTag = this.findTag(subTagName);
        if (subTag == null || superTag == null)
            return false;
        return this.isUnderTag(superTag, subTag);
    }
933751
static boolean doesParameterTypesMatchForVarArgsInvocation(boolean isVarArgs, Class<?>[] parameterTypes,
                                                                       Object[] arguments) {
        if (isVarArgs && arguments != null && arguments.length >= 1 && parameterTypes != null
                    && parameterTypes.length >= 1) {
            final Class<?> componentType = parameterTypes[parameterTypes.length - 1].getComponentType();
            final Object lastArgument = arguments[arguments.length - 1];
            if (lastArgument != null) {
                final Class<?> lastArgumentTypeAsPrimitive = getTypeAsPrimitiveIfWrapped(lastArgument);
                final Class<?> varArgsParameterTypeAsPrimitive = getTypeAsPrimitiveIfWrapped(componentType);
                isVarArgs = varArgsParameterTypeAsPrimitive.isAssignableFrom(lastArgumentTypeAsPrimitive);
            }
        }
        return isVarArgs && checkArgumentTypesMatchParameterTypes(isVarArgs, parameterTypes, arguments);
    }
230400
@Pure
	protected boolean isSubTypeOf(EObject context, JvmTypeReference subType, JvmTypeReference superType) {
		if (isTypeReference(superType) && isTypeReference(subType)) {
			StandardTypeReferenceOwner owner = new StandardTypeReferenceOwner(services, context);
			LightweightTypeReferenceFactory factory = new LightweightTypeReferenceFactory(owner, false);
			LightweightTypeReference reference = factory.toLightweightReference(subType);
			return reference.isSubtypeOf(superType.getType());
		}
		return false;
	}
146913
@Override
    public boolean hasMembersToDocument() {
        if (utils.isAnnotationType(typeElement)) {
            return !utils.getAnnotationMethods(typeElement).isEmpty();
        }
        for (VisibleMemberMap.Kind kind : VisibleMemberMap.Kind.values()) {
            VisibleMemberMap members = getVisibleMemberMap(kind);
            if (!members.noVisibleMembers()) {
                return true;
            }
        }
        return false;
    }
633209
public static boolean hasOperationType(Operation operation, Class<? extends Operation> operationType)
    {
        if (operation == null)
            return false;

        if (operationType.isAssignableFrom(operation.getClass()))
            return true;

        if (operation instanceof CompositeOperation)
        {
            List<Operation> operations = ((CompositeOperation) operation).getOperations();
            for (Operation childOperation : operations)
            {
                if (hasOperationType(childOperation, operationType))
                    return true;
            }
        }

        return false;
    }
901106
@Override
  public boolean contains(IVersion version)
  {

    // Can the versions be compared?
    if (!(version instanceof SemanticVersion)) {
      return false;
    }

    // We always want the extended version on the left, since it has the
    // more complex code.
    if (this.version instanceof ExtendedSemanticVersion) {
      switch (operator) {
        case ">":
          return this.version.lessThan(version);
        case ">=":
          return this.version.lessThanOrEqualTo(version);
        case "<":
          return this.version.greaterThan(version);
        case "<=":
          return this.version.greaterThanOrEqualTo(version);
        default:
          throw new IllegalArgumentException("Invalid operator: " + operator);
      }
    }
    else {
      switch (operator) {
        case "<":
          return ((SemanticVersion) version).lessThan(this.version);
        case "<=":
          return ((SemanticVersion) version).lessThanOrEqualTo(this.version);
        case ">":
          return ((SemanticVersion) version).greaterThan(this.version);
        case ">=":
          return ((SemanticVersion) version).greaterThanOrEqualTo(this.version);
        default:
          throw new IllegalArgumentException("Invalid operator: " + operator);
      }
    }
  }
705720
@Override
  @Nullable
  CompilerInput.ModuleType getModuleTypeByName(String moduleName) {
    return moduleTypesByName.get(moduleName);
  }
961072
protected boolean addLayer(Layer layer) {
		int index = getLayerIndex(layer);
		if (index < 0) {
			view.add(new LayerControlPanel(mapPresenter, layer, disableToggleOutOfRange));

			return true;
		}
		return false;
	}
108133
public function isModuleEnabled($modulePath)
    {
        $modulePathSegments = explode('/', $modulePath);
        $moduleConfiguration = Arrays::getValueByPath($this->settings['modules'], implode('.submodules.', $modulePathSegments));
        if (isset($moduleConfiguration['enabled']) && $moduleConfiguration['enabled'] !== true) {
            return false;
        }
        array_pop($modulePathSegments);
        if ($modulePathSegments === []) {
            return true;
        }
        return $this->isModuleEnabled(implode('/', $modulePathSegments));
    }