Registers a {@link IRegisterable}.<br>
The object has to be either a {@link Block} or an {@link Item}.

@param registerable the registerable
425898
public static void register(IRegisterable<?> registerable)
	{
		ResourceLocation name = registerable.getName();
		if (name == null)
			throw new IllegalArgumentException("No name specified for registration for " + registerable.getClass().getName());
		if (!(registerable instanceof Block || registerable instanceof Item))
			throw new IllegalArgumentException("Cannot register " + registerable.getClass().getName() + " (" + name
					+ ") because it's neither a block or an item.");

		if (registerable instanceof Block)
		{
			Block block = (Block) registerable;
			ForgeRegistries.BLOCKS.register(block);
			Item item = registerable.getItem(block);
			if (item != null)
				ForgeRegistries.ITEMS.register(item);

			//register the mapper for the block and the model for the item
			if (MalisisCore.isClient())
			{
				ModelLoader.setCustomStateMapper(block, b -> ImmutableMap.of());
				if (item != null)
					EmptyModelLoader.register(item);
			}

			ClientNotificationManager.discover(block);
		}
		else if (registerable instanceof Item)
		{
			Item item = (Item) registerable;
			ForgeRegistries.ITEMS.register(item);
			if (MalisisCore.isClient())
				EmptyModelLoader.register(item);
		}
	}
669008
public static synchronized void register(JSONObject type) {
    Class<? extends JSONObject> previous = registrations.put(type.getIdentifier(), type.getClass());
    if (previous != null && !previous.isInstance(type))
      throw new RuntimeException("Attempt to register conflicting classes for identifier: " + type.getIdentifier());
    if (previous == null)
      log.debug("Registered {} to {}", type.getIdentifier(), type.getClass());
  }
296407
@SuppressWarnings("unchecked")
   public <T> void register(String subjectName, SubjectObserver<T> subjectObserver)
   {
      Subject<?> subject = (Subject<?>)this.registry.get(subjectName);
      
      if(subject == null)
         subject = new Topic<T>();
      
      register(subjectName, subjectObserver, (Subject<T>)subject);
      
   }
216437
public <T> boolean register(final T pProvider, final Class<? super T> pCategory) {
        return registerImpl(pProvider, pCategory);
    }
967595
public void registerAggregator(String name, Aggregator<?> aggregator) {
		if (name == null || aggregator == null) {
			throw new IllegalArgumentException("Name and aggregator must not be null");
		}
		if (this.registry.containsKey(name)) {
			throw new RuntimeException("An aggregator is already registered under the given name.");
		}
		this.registry.put(name, aggregator);
	}
1025468
function registerable (cfgObj) {
    _.forIn(cfgObj, function (value, key) {
      if (registerableCfg.indexOf(key) !== -1) {
        register(key, cfgObj)
      }
    })
  }
409338
public void setInTable(boolean inTable) {
        super.setInTable(inTable);
        for(int i = 0; i < this.items.size(); i++) {
            ((RtfBasicElement) this.items.get(i)).setInTable(inTable);
        }
    }
336160
public static void initEbInterface (@Nonnull final ValidationExecutorSetRegistry aRegistry)
  {
    ValueEnforcer.notNull (aRegistry, "Registry");

    final boolean bNotDeprecated = false;

    // No Schematrons here
    for (final EEbInterfaceDocumentType e : EEbInterfaceDocumentType.values ())
    {
      final String sVersion = e.name ().charAt (3) + "." + e.name ().substring (4);
      final VESID aVESID = new VESID (GROUP_ID, "invoice", sVersion);

      // No Schematrons here
      aRegistry.registerValidationExecutorSet (ValidationExecutorSet.create (aVESID,
                                                                             "ebInterface " + sVersion,
                                                                             bNotDeprecated,
                                                                             ValidationExecutorXSD.create (e)));
    }
  }
112577
public <T extends Type & Element> void register(String fullyQualifiedName, T type) {
        if (resolve(fullyQualifiedName) != null) {
            throw new ParserException(type, "Cannot register duplicate type: %s", fullyQualifiedName);
        }
        symbolTable.put(fullyQualifiedName, type);
    }
932276
public ComponentAdapter registerComponentInstance(Object componentKey, Object componentInstance) throws PicoRegistrationException {
		if (componentInstance instanceof MutablePicoContainer) {
			MutablePicoContainer pc = (MutablePicoContainer) componentInstance;
			Object contrivedKey = new Object();
			String contrivedComp = "";
			pc.registerComponentInstance(contrivedKey, contrivedComp);
			try {
				if (this.getComponentInstance(contrivedKey) != null) {
					throw new PicoRegistrationException("Cannot register a container to itself. The container is already implicitly registered.");
				}
			} finally {
				pc.unregisterComponent(contrivedKey);
			}

		}
		ComponentAdapter componentAdapter = new InstanceComponentAdapter(componentKey, componentInstance);
		registerComponent(componentAdapter);
		return componentAdapter;
	}
738851
public void registerCloseables(final Collection<Closeable> registry, Closeable... closeables) {

        registry.addAll(Arrays.asList(closeables));

        addListener(resource -> {
            for (Closeable closeable : closeables) {
                if (closeable == RedisChannelHandler.this) {
                    continue;
                }

                try {
                    if (closeable instanceof AsyncCloseable) {
                        ((AsyncCloseable) closeable).closeAsync();
                    } else {
                        closeable.close();
                    }
                } catch (IOException e) {
                    if (debugEnabled) {
                        logger.debug(e.toString(), e);
                    }
                }
            }

            registry.removeAll(Arrays.asList(closeables));
        });
    }
222919
@Override
    public ENTRY register(final ENTRY entry) throws CouldNotPerformException {
        if (entry == null) {
            throw new NotAvailableException("entry");
        }
        log("Register " + entry + "...");
        try {
            checkWriteAccess();
            lock();
            try {
                try {
                    if (entryMap.containsKey(entry.getId())) {
                        throw new CouldNotPerformException("Could not register " + entry + "! Entry with same Id[" + entry.getId() + "] already registered!");
                    }
                    sandbox.register(entry);
                    pluginPool.beforeRegister(entry);
                    entryMap.put(entry.getId(), entry);
                    finishTransaction();
                    pluginPool.afterRegister(entry);
                } finally {
                    syncSandbox();
                }
            } finally {
                unlock();
            }
        } catch (CouldNotPerformException ex) {
            throw new CouldNotPerformException("Could not register " + entry + " in " + this + "!", ex);
        }
        notifySuccessfulTransaction();
        notifyObservers();
        return get(entry);
    }
1028484
@Nonnull
  public void setRegistry (@Nonnull final IAPIRegistry aRegistry)
  {
    ValueEnforcer.notNull (aRegistry, "Registry");
    if (m_aRWLock.readLocked ( () -> m_aRegistry.getAllAPIDescriptors ().isNotEmpty ()))
      throw new IllegalStateException ("Cannot change the registry after an API was already registered!");

    m_aRWLock.writeLocked ( () -> m_aRegistry = aRegistry);
  }
1177302
public static <I, T extends I> void registerInterface(final Class<I> interfaceClass, final T instance, final RSBLocalServer server) throws CouldNotPerformException {
        for (final Method method : interfaceClass.getMethods()) {
            if (method.getAnnotation(RPCMethod.class) != null) {
                boolean legacy = false;
                try {
                    legacy = JPService.getProperty(JPRSBLegacyMode.class).getValue();
                } catch (JPNotAvailableException e) {
                    // if not available just register legacy methods
                }
                // if legacy register always, else only register if not marked as legacy
                if (legacy || !method.getAnnotation(RPCMethod.class).legacy()) {
                    registerMethod(method, instance, server);
                }
            }
        }
    }
396532
public void registerCallback(UOWCallback callback)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) Tr.entry(tc, "registerCallback", callback);

        if (!_callbacks.contains(callback))
        {
            _callbacks.add(callback);

            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "Number of registered Callbacks: "+_callbacks.size());
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) Tr.exit(tc, "registerCallback");
    }
227467
@Override
    public void register(IESigType eSigType) throws Exception {
        if (typeRegistry.get(eSigType.getESigTypeId()) != null) {
            throw new Exception("Duplicate esig type identifier: " + eSigType.getESigTypeId());
        }

        typeRegistry.put(eSigType.getESigTypeId(), eSigType);
        init(eSigType);
    }
1137915
@Autowired
    public void setRegistry(BridgeHeadTypeRegistry registry) {
        this.registry = registry;
        registry.register(this);
        Method[] methods = offerArray(Object.class.getMethods(), nearType.getMethods());
        for (Method method : methods) {
            if (logger.isTraceEnabled()) {
                logger.trace("Method: " + display(method) + ": in: " + display(nearType));
            }
            Binding binding = getBinding(method.getReturnType(), method.getName(), method.getParameterTypes());
            if (binding == null) {
                String message = "No binding found: " + display(nearType) + ": " + display(method);
                logger.warn(message);
                throw new UnsupportedOperationException(message);
            }
            if (logger.isTraceEnabled()) {
                logger.trace("Binding: " + display(binding));
            }
            methodMap.put(method, binding);
        }
    }