Checks if template mapper is configured in modules.

@return true if the template mapper is configured in modules
511271
public static boolean checkConfiguredInModules() {

        Boolean result = m_moduleCheckCache.get();
        if (result == null) {
            result = Boolean.valueOf(getConfiguredTemplateMapping() != null);
            m_moduleCheckCache.set(result);
        }
        return result.booleanValue();
    }
923823
private function isShopTemplateBlockOverriddenByActiveModule()
    {
        if ($this->_blIsTplBlocks !== null) {
            return $this->_blIsTplBlocks;
        }

        $moduleOverridesTemplate = false;

        $ids = $this->_getActiveModuleInfo();
        if (count($ids)) {
            $templateBlockRepository = oxNew(ModuleTemplateBlockRepository::class);
            $shopId = \OxidEsales\Eshop\Core\Registry::getConfig()->getShopId();
            $activeModulesId = array_keys($ids);
            $blocksCount = $templateBlockRepository->getBlocksCount($activeModulesId, $shopId);

            if ($blocksCount) {
                $moduleOverridesTemplate = true;
            }
        }

        $this->_blIsTplBlocks = $moduleOverridesTemplate;

        return $moduleOverridesTemplate;
    }
1278004
private static boolean isSetFromPrecedingModule(
      Ref originalRef, Ref set, JSModuleGraph moduleGraph) {
    return set.type == Ref.Type.SET_FROM_GLOBAL
        && (originalRef.getModule() == set.getModule()
            || moduleGraph.dependsOn(originalRef.getModule(), set.getModule()));
  }
1007933
@Override
    public boolean hasProtocolConfiguration(ProtocolDescription description) {
        for (ProtocolDef protocol : containerConfiguration.getProtocols()) {
            if (description.getName().equals(protocol.getType())) {
                return true;
            }
        }
        return false;
    }
1128834
def _is_builtin_module(module):
    
    if (not hasattr(module, '__file__')) or  module.__name__ in sys.builtin_module_names:
        return True
    if module.__name__ in _stdlib._STD_LIB_MODULES:
        return True
    amp = os.path.abspath(module.__file__)
    if 'site-packages' in amp:
        return False
    if amp.startswith(_STD_MODULE_DIR):
        return True
    if not '.' in module.__name__:
        return False
    mn_top = module.__name__.split('.')[0]
    return mn_top in _stdlib._STD_LIB_MODULES
506627
public boolean hasConversion(String type) {
		if ((isImplicitSarlTypes() && type.startsWith(IMPLICIT_PACKAGE))
			|| isImplicitJvmTypes()) {
			return true;
		}
		if (this.mapping == null) {
			this.mapping = initMapping();
		}
		return this.mapping.containsKey(type);
	}
631719
public boolean isImportingWicket() {
        BundleWiring bundleWiring = bundle.adapt(BundleWiring.class);
        // First check if there is a wiring to any package of org.apache.wicket
        List<BundleWire> importPackageWires = bundleWiring.getRequiredWires(OSGI_WIRING_PACKAGE_NAMESPACE);
        for (BundleWire bundleWire : importPackageWires) {
            BundleRequirement requirement = bundleWire.getRequirement();
            String filter = requirement.getDirectives().get(FILTER_DIRECTIVE);
            if (filter != null) {
                Matcher matcher = PACKAGE_PATTERN_WICKET.matcher(filter);
                if (matcher.find()) {
                    return true;
                }
            }
        }
        List<BundleWire> requireBundleWires = bundleWiring.getRequiredWires(OSGI_WIRING_BUNDLE_NAMESPACE);
        if (!requireBundleWires.isEmpty()) {
            // find all apache.wicket bundles and check if there are wirings...
            Bundle[] bundles = bundleContext.paxBundleContext.getBundles();
            for (Bundle bundle : bundles) {
                String symbolicName = bundle.getSymbolicName();
                if (symbolicName.startsWith(APACHE_WICKET_NAMESPACE)) {
                    Map<String, Object> map = createMapWithVersion(OSGI_WIRING_BUNDLE_NAMESPACE, symbolicName,
                        bundle.getVersion());
                    if (hasWireMatchingFilter(requireBundleWires, map)) {
                        return true;
                    }
                }
            }
        }
        return false;
    }
802081
public boolean isExtendCommonMapper(Class<?> mapperInterface) {
        for (Class<?> mapperClass : registerClass) {
            if (mapperClass.isAssignableFrom(mapperInterface)) {
                return true;
            }
        }
        //通过 @RegisterMapper 注解自动注册的功能
        return hasRegisterMapper(mapperInterface);
    }
717901
private static boolean hasJUnitAttr(MethodSymbol methodSym) {
    return methodSym.getRawAttributes().stream()
        .anyMatch(attr -> attr.type.tsym.getQualifiedName().toString().startsWith("org.junit."));
  }
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;
    }
807314
public boolean hasExtPros() {
    Field[] fields = getClass().getDeclaredFields();
    for (int i = 0; i < fields.length; i++) {
      if (!(Modifier.isFinal(fields[i].getModifiers())
          || Modifier.isStatic(fields[i].getModifiers()))) { return true; }
    }
    return false;
  }
151468
def is_templatetags_module_valid_constant(node):
    """"""
    if node.name not in ('register', ):
        return False

    parent = node.parent
    while not isinstance(parent, Module):
        parent = parent.parent

    if "templatetags." not in parent.name:
        return False

    return True
1074983
private static boolean isEditableTemplate(@NotNull Template template) {
    Resource resource = template.adaptTo(Resource.class);
    if (resource != null) {
      return resource.getChild(NN_EDITABLE_TEMPLATE_INITIAL) != null
          && resource.getChild(NN_EDITABLE_TEMPLATE_STRUCTURE) != null
          && resource.getChild(NN_EDITABLE_TEMPLATE_POLICIES) != null;
    }
    return false;
  }
743967
public boolean isRaw() {
        if (this.typeParameters.length == 0) {
            return true;
        }
        for (int i = 0, n = this.typeParameters.length; i < n; i++) {
            if (!this.typeParameters[i].equals(WildcardTypeParameter.UNKNOWN)) {
                return false;
            }
        }
        return true;
    }
567596
private boolean hasConstantField (ClassDoc classDoc) {
        VisibleMemberMap visibleMemberMapFields = new VisibleMemberMap(classDoc,
            VisibleMemberMap.FIELDS, configuration);
        List<?> fields = visibleMemberMapFields.getLeafClassMembers(configuration);
        for (Iterator<?> iter = fields.iterator(); iter.hasNext(); ) {
            FieldDoc field = (FieldDoc) iter.next();
            if (field.constantValueExpression() != null) {
                classDocsWithConstFields.add(classDoc);
                return true;
            }
        }
        return false;
    }
694971
public boolean canPersist(Class<?> cls) {
		Object mapper = OBJECT_MAPPERS.get(cls);
		if (mapper == null) {
			// The only way the mapper wouldn't already be loaded into
			// OBJECT_MAPPERS is if it was compiled separately, but let's handle
			// it anyway
			String beanClassName = cls.getName();
			String mapperClassName = cls.getName() + KriptonBinder.MAPPER_CLASS_SUFFIX;
			try {
				Class<?> mapperClass = (Class<?>) Class.forName(mapperClassName);
				mapper = mapperClass.newInstance();
				// mapper.

				return true;
			} catch (ClassNotFoundException e) {
				e.printStackTrace();
				throw new KriptonRuntimeException(String.format("Class '%s' does not exist. Does '%s' have @BindType annotation?", mapperClassName, beanClassName));
			} catch (InstantiationException e) {
				e.printStackTrace();
			} catch (IllegalAccessException e) {
				e.printStackTrace();
			}
		}
		return false;

	}
1172279
private void checkTemplate(TemplateNode node, TemplateRegistry templateRegistry) {
    ListMultimap<String, SourceLocation> dataKeys = ArrayListMultimap.create();

    for (VarRefNode varRefNode : SoyTreeUtils.getAllNodesOfType(node, VarRefNode.class)) {
      if (varRefNode.isPossibleHeaderVar()) {
        dataKeys.put(varRefNode.getName(), varRefNode.getSourceLocation());
      }
    }

    IndirectParamsInfo ipi =
        new IndirectParamsCalculator(templateRegistry)
            .calculateIndirectParams(templateRegistry.getMetadata(node));

    Set<String> allHeaderVarNames = new HashSet<>();
    List<TemplateHeaderVarDefn> unusedParams = new ArrayList<>();
    // Process @param header variables.
    for (TemplateParam param : node.getAllParams()) {
      allHeaderVarNames.add(param.name());
      if (dataKeys.containsKey(param.name())) {
        // Good: Declared and referenced in template. We remove these from dataKeys so
        // that at the end of the for-loop, dataKeys will only contain the keys that are referenced
        // but not declared in SoyDoc.
        dataKeys.removeAll(param.name());
      } else if (ipi.paramKeyToCalleesMultimap.containsKey(param.name())
          || ipi.mayHaveIndirectParamsInExternalCalls
          || ipi.mayHaveIndirectParamsInExternalDelCalls) {
        // Good: Declared in SoyDoc and either (a) used in a call that passes all data or (b) used
        // in an external call or delcall that passes all data, which may need the param (we can't
        // verify).
      } else {
        // Bad: Declared in SoyDoc but not referenced in template.
        unusedParams.add(param);
      }
    }

    List<TemplateHeaderVarDefn> unusedStateVars = new ArrayList<>();
    // Process @state header variables.
    if (node instanceof TemplateElementNode) {
      TemplateElementNode el = (TemplateElementNode) node;
      for (TemplateStateVar stateVar : el.getStateVars()) {
        allHeaderVarNames.add(stateVar.name());
        if (dataKeys.containsKey(stateVar.name())) {
          // Good: declared and referenced in the template.
          dataKeys.removeAll(stateVar.name());
        } else {
          // Bad: declared in the header, but not used.
          unusedStateVars.add(stateVar);
        }
      }
    }
    // At this point, the only keys left in dataKeys are undeclared.
    for (Entry<String, SourceLocation> undeclared : dataKeys.entries()) {
      String extraErrorMessage =
          SoyErrors.getDidYouMeanMessage(allHeaderVarNames, undeclared.getKey());
      errorReporter.report(
          undeclared.getValue(), UNDECLARED_DATA_KEY, undeclared.getKey(), extraErrorMessage);
    }

    // Delegate templates can declare unused params because other implementations
    // of the same delegate may need to use those params.
    if (node instanceof TemplateBasicNode) {
      reportUnusedHeaderVars(errorReporter, unusedParams, UNUSED_PARAM);
    }
    if (node instanceof TemplateElementNode) {
      reportUnusedHeaderVars(errorReporter, unusedStateVars, UNUSED_STATE);
    }
  }