Get the enabled/disabled status of given Detector.

@param factory
the DetectorFactory of the Detector
@return true if the Detector is enabled, false if not
357626
public boolean isDetectorEnabled(DetectorFactory factory) {
        String detectorName = factory.getShortName();
        Boolean enabled = detectorEnablementMap.get(detectorName);
        if (enabled == null) {
            // No explicit preference has been specified for this detector,
            // so use the default enablement specified by the
            // DetectorFactory.
            enabled = factory.isDefaultEnabled();
            detectorEnablementMap.put(detectorName, enabled);
        }
        return enabled;
    }
191977
private void setConditionEnabled(boolean enabled)
	{
		fConditionEditor.setEnabled(enabled);
		fSuspendWhenLabel.setEnabled(enabled);
		fConditionIsTrue.setEnabled(enabled);
		fConditionHasChanged.setEnabled(enabled);
	}
1307732
public DetectorFactory getFactoryByFullName(final String fullName) {
        return findFirstMatchingFactory(factory -> factory.getFullName().equals(fullName));
    }
145369
function(factory) {
                        var factoryName = _.isString(factory) ? factory : factory.getName();
                        return this.__hasPropertyValue(['factory', factoryName]);
                    }
775489
public static boolean deregister( @Nonnull final Factory factory )
  {
    if ( g_factory != factory )
    {
      return false;
    }
    else
    {
      g_factory = null;
      return true;
    }
  }
515984
def is_enabled():
    '''
    
    '''
    cmd = 'service -e'
    services = __salt__['cmd.run'](cmd, python_shell=False)
    for service in services.split('\\n'):
        if re.search('jail', service):
            return True
    return False
344432
@SuppressWarnings("unchecked")
    public <T> CellConverterFactory<T> getConverterFactory(final Class<T> clazz) {
        ArgUtils.notNull(clazz, "clazz");
        
        CellConverterFactory<T> converterFactory = (CellConverterFactory<T>) converterFactoryMap.get(clazz);
        if(converterFactory == null) {
            // 特別に判定が必要なクラス
            if(Enum.class.isAssignableFrom(clazz)) {
                converterFactory = (CellConverterFactory<T>) converterFactoryMap.get(Enum.class);
                
            } else if(List.class.isAssignableFrom(clazz)) {
                converterFactory = (CellConverterFactory<T>) converterFactoryMap.get(List.class);
                
            } else if(clazz.isArray()) {
                converterFactory = (CellConverterFactory<T>) converterFactoryMap.get(Object[].class);
                
            }
        }
        
        return converterFactory;
    }
237006
public void setBarEffectEnabled(final boolean ENABLED) {
        if (null == barEffectEnabled) {
            _barEffectEnabled = ENABLED;
            fireUpdateEvent(VISIBILITY_EVENT);
        } else {
            barEffectEnabled.set(ENABLED);
        }
    }
263736
public void addMessageSelectorFactory(MessageSelectorFactory<?> factory) {
        if (factory instanceof BeanFactoryAware) {
            ((BeanFactoryAware) factory).setBeanFactory(beanFactory);
        }

        this.factories.add(factory);
    }
873044
def enabled(name):
    '''
    
    '''
    ret = {'name': name, 'result': True, 'comment': '', 'changes': {}}

    is_enabled = __salt__['apache.check_conf_enabled'](name)
    if not is_enabled:
        if __opts__['test']:
            msg = 'Apache conf {0} is set to be enabled.'.format(name)
            ret['comment'] = msg
            ret['changes']['old'] = None
            ret['changes']['new'] = name
            ret['result'] = None
            return ret
        status = __salt__['apache.a2enconf'](name)['Status']
        if isinstance(status, six.string_types) and 'enabled' in status:
            ret['result'] = True
            ret['changes']['old'] = None
            ret['changes']['new'] = name
        else:
            ret['result'] = False
            ret['comment'] = 'Failed to enable {0} Apache conf'.format(name)
            if isinstance(status, six.string_types):
                ret['comment'] = ret['comment'] + ' ({0})'.format(status)
            return ret
    else:
        ret['comment'] = '{0} already enabled.'.format(name)
    return ret
1373486
@Bind(aggregate = true)
    public void bindFactory(Factory factory) {

        // Only support primitive component
        if (!(factory instanceof ComponentFactory)) {
            return;
        }

        String cn = factory.getClassName();
        if (cn == null) {
            return;
        }

        // Has the factory the annotation
        try {
            Class clazz = ((ComponentFactory) factory).loadClass(cn);
            InstantiatedBy annotation = (InstantiatedBy) clazz.getAnnotation(InstantiatedBy.class);

            if (annotation != null) {
                // Match !
                LOGGER.info("Factory annotated with `@InstantiatedBy` found : {}, configuration : {}",
                        factory.getName(),
                        annotation.value());

                addInstanceDeclaration(factory, annotation.value());
            }
        } catch (ClassNotFoundException e) {
            LOGGER.error("Cannot load the component class {}", cn, e);
        }
    }
320820
public boolean containsReturnValue(ValueNumberFactory factory) {
        for (int i = 0; i + 1 < array.length; i += 2) {
            int valueNumber = array[i];
            if (valueNumber < 0) {
                break;
            }
            int lockCount = array[i + 1];
            if (lockCount > 0 && factory.forNumber(valueNumber).hasFlag(ValueNumber.RETURN_VALUE)) {
                return true;
            }
        }
        return false;
    }
1161207
@Nullable
    public static ThreadFactory getDisableInheritableThreadFactory(@Nullable ThreadFactory threadFactory) {
        if (threadFactory == null || isDisableInheritableThreadFactory(threadFactory)) return threadFactory;

        return new DisableInheritableThreadFactoryWrapper(threadFactory);
    }
801168
public static boolean isDebuggingEnabled() {
        boolean debuggingEnabled = false;
        if (ManagementFactory.getRuntimeMXBean().getInputArguments().toString().indexOf("-agentlib:jdwp") > 0) {
            debuggingEnabled = true;
        } else if (ManagementFactory.getRuntimeMXBean().getInputArguments().contains("-Xdebug")) {
            debuggingEnabled = true;
        } else if (System.getProperty("debug", "").equals("true")) {
            debuggingEnabled = true;
        }
        return debuggingEnabled;
    }
549720
public boolean isDisabled(FaceletContext ctx) {
        return disabled != null && Boolean.TRUE.equals(disabled.getBoolean(ctx));
    }
1293982
public static void channelOperationFactory(AbstractBootstrap<?, ?> b,
			ChannelOperations.OnSetup opsFactory) {
		Objects.requireNonNull(b, "bootstrap");
		Objects.requireNonNull(opsFactory, "opsFactory");
		b.option(OPS_OPTION, opsFactory);
	}
137492
public function isEnabled()
    {
        if ($this->enabled === null) {
            $environments  = config('songshenzong-log.env', ['dev', 'local', 'production']);
            $this->enabled = in_array(env('APP_ENV'), $environments, true);
        }

        return $this->enabled;
    }