Create an instance of the required MBean and register it

@param c
@return
3956
private Controllable createQueueMBean(Controllable c) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "createQueuePointMBean", new Object[] { c });
        JsQueue qp = new JsQueue(_me, c);
        controllableMap.put(c, qp);

        try {
            Dictionary<String, Object> properties = new Hashtable<String, Object>();
            properties.put("service.vendor", "IBM");
            String cName = c.getName();
            properties.put("jmx.objectname", "WebSphere:feature=wasJmsServer,type=Queue,name=" + cName);
            ServiceRegistration<QueueMBean> qMbean = (ServiceRegistration<QueueMBean>) bcontext.registerService(QueueMBean.class.getName(), qp, properties);
            serviceObjects.put(cName, qMbean);
        } catch (Exception e) {
            SibTr.exception(tc, e);
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "createQueuePointMBean", new Object[] { qp });
        return qp;

    }
1246163
private CompletableFuture<Void> createRepository(CreateRepositoryCommand c) {
        return CompletableFuture.supplyAsync(() -> {
            projectManager.get(c.projectName()).repos().create(c.repositoryName(), c.timestamp(), c.author());
            return null;
        }, repositoryWorker);
    }
1227528
public Subscription register(final Object mBean, final MBeanDescription description) {
        Assert.requireNonNull(description, "description");
        return register(mBean, description.getMBeanName(getNextId()));
    }
1114314
public static String createSequence(char c, int length) {
        if (length < 0) length = 1;

        StringBuffer buf = new StringBuffer(length);
        for (; length > 0; length--) {
            buf.append(c);
        }
        return buf.toString();
    }
852807
public <C extends Closeable> C register(@Nullable C closeable)
  {
    if (closeable != null) {
      stack.addFirst(closeable);
    }

    return closeable;
  }
831297
protected KeyBucket makeBucket(char c) {
        if (c > this.buckets.length) {
            // can't handle non-ASCII chars
            return null;
        }
        int index = c;
        // if we're case-insensitive, push uppercase into lowercase buckets
        if (!isCaseSensitive() && (c >= 'A' && c <= 'Z')) {
            index += 32;
        }
        if (null == this.buckets[index]) {
            this.buckets[index] = new KeyBucket();
        }
        return this.buckets[index];
    }
1056429
public static JMDictSense create() {
		if (index >= instances.size()) {
			instances.add(new JMDictSense());
		}
		return instances.get(index++);
	}
375705
public static NGBeanAttributeInfo getBeanAttributeInfos(UIComponent c) {
		String core = getCoreValueExpression(c);
		synchronized (beanAttributeInfos) {
			if (beanAttributeInfos.containsKey(c)) {
				return beanAttributeInfos.get(c);
			}
		}
		NGBeanAttributeInfo info = new NGBeanAttributeInfo(c);
		synchronized (beanAttributeInfos) {
			beanAttributeInfos.put(core, info);
		}
		return info;
	}
855285
public final BeanO create(EJSContainer c, EJSHome h, boolean reactivate) // d623673.1
    throws RemoteException, InvocationTargetException
    {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
        if (isTraceOn && tc.isEntryEnabled())
            Tr.entry(tc, "create: " + h);

        BeanO beanO = newInstance(c, h);
        boolean success = false;

        try
        {
            beanO.initialize(reactivate);
            success = true;
        } finally
        {
            if (!success)
            {
                beanO.discard();
            }

            if (isTraceOn && tc.isEntryEnabled())
                Tr.exit(tc, "create: " + beanO + ", success=" + success);
        }

        return beanO;
    }
911644
@Override
    public ConfusionMessage createCNF() {
        ConfusionMessage msg = new ConfusionMessageImpl(_CNF_HOLDER.mandatoryCodes, _CNF_HOLDER.mandatoryVariableCodes,
                _CNF_HOLDER.optionalCodes, _CNF_HOLDER.mandatoryCodeToIndex, _CNF_HOLDER.mandatoryVariableCodeToIndex,
                _CNF_HOLDER.optionalCodeToIndex);
        return msg;
    }
345168
public static <K,T> Cache2kBuilder<K, T> of(Cache2kConfiguration<K, T> c) {
    Cache2kBuilder<K,T> cb = new Cache2kBuilder<K, T>(c);
    return cb;
  }
638067
private Controllable createTopicMBean(Controllable c) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "createPublicationPointMBean", new Object[] { c });
        TopicImpl pp = new TopicImpl(_me, c);
        controllableMap.put(c, pp);
        try {
            Dictionary<String, Object> properties = new Hashtable<String, Object>();
            properties.put("service.vendor", "IBM");
            String cName = c.getName();
            properties.put("jmx.objectname", "WebSphere:feature=wasJmsServer,type=Topic,name=" + cName);
            ServiceRegistration<TopicMBean> topicMBean = (ServiceRegistration<TopicMBean>) bcontext.registerService(TopicMBean.class.getName(), pp, properties);
            serviceObjects.put(cName, topicMBean);
        } catch (Exception e) {
            SibTr.exception(tc, e);
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "createPublicationPointMBean", new Object[] { pp });
        return pp;

    }
588254
public MBeanInfo createMBeanInfo() {
        if (type != null) {
            return new MBeanInfo(type.getName(), description, getAttributeInfo(), getConstructorInfo(), getOperationInfo(), getNotificationInfo());
        } else {
            return new MBeanInfo(name, description, getAttributeInfo(), getConstructorInfo(), getOperationInfo(), getNotificationInfo());
        }
    }
730297
@SuppressWarnings("unchecked")
    public static Object[] toArray(final Collection<?> c) {
        if (N.isNullOrEmpty(c)) {
            return N.EMPTY_OBJECT_ARRAY;
        }

        return c.toArray(new Object[c.size()]);
    }
526391
public Subscription register(final Object mBean, final String name){
        try {
            if (mbeanSupport.get()) {
                final ObjectName objectName = new ObjectName(name);
                server.registerMBean(mBean, objectName);
                return new Subscription() {
                    @Override
                    public void unsubscribe() {
                        try {
                            server.unregisterMBean(objectName);
                        } catch (JMException e) {
                            throw new RuntimeException("Can not unsubscribe!", e);
                        }
                    }
                };
            } else {
                return new Subscription() {
                    @Override
                    public void unsubscribe() {
                    }
                };
            }
        } catch (Exception e) {
            throw new RuntimeException("Can not register MBean!", e);
        }
    }
1268031
@Override
    public ContinuityCheckRequestMessage createCCR() {
        ContinuityCheckRequestMessageImpl ccr = new ContinuityCheckRequestMessageImpl(_CCR_HOLDER.mandatoryCodes,
                _CCR_HOLDER.mandatoryVariableCodes, _CCR_HOLDER.optionalCodes, _CCR_HOLDER.mandatoryCodeToIndex,
                _CCR_HOLDER.mandatoryVariableCodeToIndex, _CCR_HOLDER.optionalCodeToIndex);
        return ccr;
    }
1272770
@Override
    public ConnectionFactory createConnectionFactory(JmsJcaConnectionFactory jcaConnectionFactory) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "createConnectionFactory", jcaConnectionFactory);
        ConnectionFactory cf = new JmsManagedConnectionFactoryImpl(jcaConnectionFactory);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "createConnectionFactory", cf);
        return cf;
    }