Determines whether this guard will "elevate" the status of any disabled
diagnostic type in the group to a warning or an error.
345878
@Override
  public boolean enables(DiagnosticGroup group) {
    for (WarningsGuard guard : guards) {
      if (guard.enables(group)) {
        return true;
      } else if (guard.disables(group)) {
        return false;
      }
    }

    return false;
  }
158827
private static boolean isGosuClassAccessingProtectedOrInternalMethodOfClassInDifferentClassloader( ICompilableTypeInternal callingClass, IType declaringClass, IRelativeTypeInfo.Accessibility accessibility )
  {
    return (accessibility != IRelativeTypeInfo.Accessibility.PUBLIC ||
            AccessibilityUtil.forType( declaringClass ) == IRelativeTypeInfo.Accessibility.INTERNAL ||
            AccessibilityUtil.forType( declaringClass ) == IRelativeTypeInfo.Accessibility.PRIVATE)
           && getTopLevelNamespace( callingClass ).equals( getTopLevelNamespace( declaringClass ) )
           && (isInSeparateClassLoader( callingClass, declaringClass ) ||
               classesLoadInSeparateLoader( callingClass, declaringClass ));

  }
960216
public boolean isInfoEnabled() {
        if (repository.isDisabled(Level.INFO_INT))
            return false;
        return Level.INFO.isGreaterOrEqual(this.getEffectiveLevel());
    }
1084080
private boolean isIgnoredType(Class<?> pReturnType) {
        for (Class<?> type : IGNORED_RETURN_TYPES) {
            if (type.isAssignableFrom(pReturnType)) {
                return true;
            }
        }
        return false;
    }
1111298
static void ensureAccessible(AccessibleObject accessibleObject) {
        if (accessibleObject != null) {
            if (!accessibleObject.isAccessible()) {
                if (System.getSecurityManager() != null) {
                    AccessController.doPrivileged(SetAccessibleAction.of(accessibleObject));
                } else {
                    accessibleObject.setAccessible(true);
                }
            }
        }
    }
1080944
public void setWarningLevel(CompilerOptions options, String name, CheckLevel level) {
    DiagnosticGroup group = forName(name);
    Preconditions.checkNotNull(group, "No warning class for name: %s", name);
    options.setWarningLevel(group, level);
  }
621299
def _validate_default_privileges(object_type, defprivs, defprivileges):
    '''
    
    '''
    if object_type != 'group':
        _defperms = [_DEFAULT_PRIVILEGES_MAP[defperm]
                for defperm in _DEFAULT_PRIVILEGE_TYPE_MAP[object_type]]
        _defperms.append('ALL')

        if object_type not in _DEFAULT_PRIVILEGES_OBJECTS:
            raise SaltInvocationError(
                'Invalid object_type: {0} provided'.format(object_type))

        if not set(defprivs).issubset(set(_defperms)):
            raise SaltInvocationError(
                'Invalid default privilege(s): {0} provided for object {1}'.format(
                defprivileges, object_type))
    else:
        if defprivileges:
            raise SaltInvocationError(
                'The default privileges option should not '
                'be set for object_type group')
862679
@Override
    public boolean isLevelEnabled(int level) {
        switch (level) {
        case LogChute.DEBUG_ID:
            return log.isDebugEnabled();
        case LogChute.INFO_ID:
            return log.isInfoEnabled();
        case LogChute.TRACE_ID:
            return log.isTraceEnabled();
        case LogChute.WARN_ID:
            return log.isWarnEnabled();
        case LogChute.ERROR_ID:
            return log.isErrorEnabled();
        default:
            return true;
        }
    }
1106085
def can_execute(self):
        """"""
        return not self._disabled and all(dep.status == dep.node.S_OK for dep in self.deps)
1025222
public boolean isErrorEnabled()
    {
        if (IS12)
        {
            return getLogger().isEnabledFor(Level.ERROR);
        }
        return getLogger().isEnabledFor(Level.ERROR);
    }
26449
public function isEnabled()
    {
        if (null !== $this->getRequireRouteName())
        {
            if ($this->getInvertRequireRouteName() XOR ($this->getCurrentRouteName() != $this->getRequireRouteName()))
            {
                return false;
            }
        }

        return $this->enabledIfRoleMissing || $this->userHasRequiredRole();
    }
531392
public static boolean getCurrentSecurityEnabled()
  {
      boolean enabled = false;
      ICollaboratorHelper instance = getCurrentInstance();
      if (instance != null)
          enabled = ((CollaboratorHelperImpl)instance).isSecurityEnabled();
      return enabled;
  }
892755
def isEnabled( self ):
        
        if ( self._disableWithLayer and self._layer ):
            lenabled = self._layer.isEnabled()
        else:
            lenabled = True
            
        return self._enabled and lenabled
886951
private function isEnabled()
    {
        if (!$this->enabled) {
            return false;
        }

        if ($this->authorizationChecker) {
            foreach ($this->trustedRoles as $trustedRole) {
                if ($this->authorizationChecker->isGranted($trustedRole)) {
                    return false;
                }
            }
        }

        return true;
    }
549720
public boolean isDisabled(FaceletContext ctx) {
        return disabled != null && Boolean.TRUE.equals(disabled.getBoolean(ctx));
    }
725411
static boolean isGeneralSendError(Symbol amqpError) {
        return (amqpError == ClientConstants.SERVER_BUSY_ERROR
                || amqpError == ClientConstants.TIMEOUT_ERROR
                || amqpError == AmqpErrorCode.ResourceLimitExceeded);
    }
1224673
public boolean isTraceEnabled() {
		return MINIMUM_LEVEL_COVERS_TRACE && provider.isEnabled(STACKTRACE_DEPTH, null, org.tinylog.Level.TRACE);
	}