Set a shared source, it is an object saved into the inside map for a name

@param name the name for the saved project, must not be null
@param obj  the object to be saved in, must not be null
196964
public void setSharedResource(@Nonnull final String name, @Nonnull final Object obj) {
    assertNotNull("Name is null", name);
    assertNotNull("Object is null", obj);

    sharedResources.put(name, obj);
  }
674993
@Override
	public void rebind(String name, Object obj) throws NamingException
    {
        rebind(new CompositeName(name), obj);
    }
821016
@Override
    public final void setObjectProperty(String name, Object value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setObjectProperty", new Object[] { name, value });

        /* If the property is either JMSXUserID or JMSXAppID, we set it into the */
        /* message regardless of whether it is null. We know the value is a */
        /* String as the JMS API layer has vetted it. Moved code under d325186.1 */
        if (SIProperties.JMSXAppID.equals(name)) {
            setJmsxAppId((String) value);
        }
        else if (SIProperties.JMSXUserID.equals(name)) {
            setUserid((String) value);
        }
        /* Ditto for JMS_IBM_ArmCorrelator & JMS_TOG_ARM_Correlator */
        else if (SIProperties.JMS_IBM_ArmCorrelator.equals(name)) {
            setARMCorrelator((String) value);
        }
        else if (SIProperties.JMS_TOG_ARM_Correlator.equals(name)) {
            setARMCorrelator((String) value);
        }

        /* else, if the value is not null, set the Property */
        else if (value != null) {
            setNonNullProperty(name, value);
        }

        /* Otherwise, remove it */
        else {

            /* Maelstrom's transportVersion has its own field - the rest are in the */
            /* JmsPropertyMap */
            if (!name.startsWith(JMS_PREFIX)) {
                if (name.equals(MfpConstants.PRP_TRANSVER)) {
                    clearTransportVersion();
                }
                else {
                    if (mayHaveJmsUserProperties()) {
                        getJmsUserPropertyMap().remove(name);
                    }
                }
            }
            else {
                if (name.startsWith(JMS_IBM_MQMD_PREFIX)) {
                    deleteMQMDProperty(name);
                }
                else {
                    if (mayHaveMappedJmsSystemProperties()) {
                        getJmsSystemPropertyMap().remove(name); // 234893
                    }
                    // JMS_IBM_Character_Set and JMS_IBM_Encoding need to be cleared in the
                    // message itself too.                                          d395685
                    if (name.equals(SIProperties.JMS_IBM_Character_Set)) {
                        setCcsid(null);
                    }
                    else if (name.equals(SIProperties.JMS_IBM_Encoding)) {
                        setEncoding(null);
                    }
                }
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setObjectProperty");
    }
10784
public RequestContext renderJSONValue(final String name, final Object obj) {
        if (renderer instanceof JsonRenderer) {
            final JsonRenderer r = (JsonRenderer) renderer;

            final JSONObject ret = r.getJSONObject();
            ret.put(name, obj);
        }

        return this;
    }
1074775
public void setValue(String name, Object value)
    {
        map.get(name).stream().forEach((im) ->
        {
            im.invoke(value);
        }
1108607
public void registerDataSource(String name, DataSource dataSource) {
        if (dataSource == null) {
            throw new NullPointerException("dataSource");
        }
        if (StringUtils.isBlank(name)) {
            throw new IllegalArgumentException("blank name");
        }
        if (name.equals("*")) {
            defaultDataSource = new DataSourceHolder(dataSource);
        } else {
            dataSources.putIfAbsent(name, new DataSourceHolder(dataSource));
        }
    }
777255
public static void dumpAll(String name, Object obj) {
		dumpAll(name, obj, StringPrinter.systemOut());
	}
1247135
@Override
    public Object lookup(String name)
    {
        // Note: this context method is allowed from all bean methods,
        //       except the constructor... which has not way to access
        //       the context.  Therefore, no 'state' checking needs
        //       to be performed... just validate the parameter.
        if (name == null)
            throw new IllegalArgumentException("null 'name' parameter.");

        Object result = null;

        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
        if (isTraceOn && tc.isEntryEnabled())
            Tr.entry(tc, "lookup: " + name);

        // Previously, this method used Naming for comp/env, which tolerated the
        // 'name' starting with 'java:comp/env/', but that is NOT part of the
        // name in our map.                                                d473811
        String lookupName = name;
        if (name.startsWith("java:comp/env/")) // F743-609 remove useless null check
        {
            lookupName = name.substring(14);
        }

        // -----------------------------------------------------------------------
        // Rather than perform a lookup using Naming, the InjectionBinding
        // that was created during populateJavaNameSpace will be located
        // and used to obtain/create the result object, just like it
        // would be done for injection.                                    d473811
        // -----------------------------------------------------------------------

        InjectionBinding<?> binding = home.beanMetaData.ivJavaColonCompEnvMap.get(lookupName);

        if (binding != null)
        {
            try
            {
                result = binding.getInjectionObject();
            } catch (InjectionException ex)
            {
                FFDCFilter.processException(ex, CLASS_NAME + ".lookup",
                                            "1342", this);
                IllegalArgumentException iae = new IllegalArgumentException
                                ("Failure occurred obtaining object for " + name +
                                 " reference defined for " + home.beanMetaData.j2eeName, ex);

                if (isTraceOn && tc.isEntryEnabled())
                    Tr.exit(tc, "lookup: " + iae);

                throw iae;
            }
        }
        else
        {
            result = container.getEJBRuntime().javaColonLookup(name, home);
        }

        if (isTraceOn && tc.isEntryEnabled())
            Tr.exit(tc, "lookup: " + result.getClass().getName());

        return result;
    }
430118
public void setPublishedName(String name) {
        //log.debug("setPublishedName: {}", name);
        // a publish name of "false" is a special case, used when stopping a stream
        if (StringUtils.isNotEmpty(name) && !"false".equals(name)) {
            this.publishedName = name;
            registerJMX();
        }
    }
1307987
public void setObject(Object obj) {
		this.checkNull(obj);
		this.list.add(obj);
		this.type.add(Object.class);
	}
971416
@Override
    public IClientSharedObject getSharedObject(String name, boolean persistent) {
        log.debug("getSharedObject name: {} persistent {}", new Object[] { name, persistent });
        ClientSharedObject result = sharedObjects.get(name);
        if (result != null) {
            if (result.isPersistent() != persistent) {
                throw new RuntimeException("Already connected to a shared object with this name, but with different persistence.");
            }
            return result;
        }
        result = new ClientSharedObject(name, persistent);
        sharedObjects.put(name, result);
        return result;
    }
694913
public static void setPrivateField(final Object obj, final String name, final Object value) {
        try {
            final Field field = obj.getClass().getDeclaredField(name);
            field.setAccessible(true);
            field.set(obj, value);
        } catch (final Exception ex) {
            throw new RuntimeException("Couldn't set field '" + name + "' in class '" + obj.getClass() + "'", ex);
        }
    }
85797
@SuppressWarnings("unchecked")
    public <T, V> T putNamedObject(String name, V object) {
        return (T)_named.put(name, object);
    }
1028130
public void setName(String name) {
        String oldname = this.name;
        this.name = name;
        //TODO Reset the main map
        save(oldname);
    }
1280224
public void setVariable(String name, Object value) {
        if (variables == null)
            variables = new LinkedHashMap();
        variables.put(name, value);
    }
940423
public void set(String name, Object obj) throws IOException {
        if (name.equalsIgnoreCase(KEY_ID)) {
            if (!(obj instanceof KeyIdentifier)) {
              throw new IOException("Attribute value should be of " +
                                    "type KeyIdentifier.");
            }
            id = (KeyIdentifier)obj;
        } else if (name.equalsIgnoreCase(AUTH_NAME)) {
            if (!(obj instanceof GeneralNames)) {
              throw new IOException("Attribute value should be of " +
                                    "type GeneralNames.");
            }
            names = (GeneralNames)obj;
        } else if (name.equalsIgnoreCase(SERIAL_NUMBER)) {
            if (!(obj instanceof SerialNumber)) {
              throw new IOException("Attribute value should be of " +
                                    "type SerialNumber.");
            }
            serialNum = (SerialNumber)obj;
        } else {
          throw new IOException("Attribute name not recognized by " +
                        "CertAttrSet:AuthorityKeyIdentifier.");
        }
        encodeThis();
    }
444227
public void set(String name, Object obj) throws IOException {
        if (name.equalsIgnoreCase(SKIP_CERTS)) {
            if (!(obj instanceof Integer))
                throw new IOException("Attribute value should be of type Integer.");
            int skipCertsValue = ((Integer)obj).intValue();
            if (skipCertsValue < -1)
                throw new IOException("Invalid value for skipCerts");
            if (skipCertsValue == -1) {
                skipCerts = Integer.MAX_VALUE;
            } else {
                skipCerts = skipCertsValue;
            }
        } else
            throw new IOException("Attribute name not recognized by " +
                                  "CertAttrSet:InhibitAnyPolicy.");
        encodeThis();
    }