/*
To make it convenient for all sub-types to just return the results of setParam
the sub type should call setup passing it's this reference

@param ref "this" in any sub type
496908
protected void setup(T ref, String... requiredParams) {
        thisRef = ref;
        if (requiredParams == null) {
            throw new IllegalArgumentException("Set of required params cannot be null");
        }
        for (String param : requiredParams) {
            required.add(PREFIX + param);
        }
    }
480476
public void modifed(ServiceReference<ResourceFactory> ref) {
        String[] newInterfaces = getServiceInterfaces(ref);
        if (!Arrays.equals(interfaces, newInterfaces)) {
            unregister();
            register(ref, newInterfaces);
        } else {
            registration.setProperties(getServiceProperties(ref));
        }
    }
928060
function (ref, component) {
    var inst = this.getPublicInstance();
    !(inst != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Stateless function components cannot have refs.') : _prodInvariant('110') : void 0;
    var publicComponentInstance = component.getPublicInstance();
    if (process.env.NODE_ENV !== 'production') {
      var componentName = component && component.getName ? component.getName() : 'a component';
      process.env.NODE_ENV !== 'production' ? warning(publicComponentInstance != null || component._compositeType !== CompositeTypes.StatelessFunctional, 'Stateless function components cannot be given refs ' + '(See ref "%s" in %s created by %s). ' + 'Attempts to access this ref will fail.', ref, componentName, this.getName()) : void 0;
    }
    var refs = inst.refs === emptyObject ? inst.refs = {} : inst.refs;
    refs[ref] = publicComponentInstance;
  }
266264
public void setWebAppSecurityCollaborator(ServiceReference<IWebAppSecurityCollaborator> ref) {
        String securityType = getSecurityType(ref);

        webAppSecurityCollaborators.putReference(securityType, ref);
    }
40366
protected void setMetaTypeService(ServiceReference<MetaTypeService> ref) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "setMetaTypeService", ref);
        metaTypeServiceRef.setReference(ref);
    }
467383
@Reference(name = BASE_INSTANCE,
               service = ContextService.class,
               cardinality = ReferenceCardinality.OPTIONAL,
               policy = ReferencePolicy.DYNAMIC,
               policyOption = ReferencePolicyOption.GREEDY,
               target = "(id=unbound)")
    protected void setBaseInstance(ServiceReference<ContextService> ref) {
        lock.writeLock().lock();
        try {
            threadContextConfigurations = null;
        } finally {
            lock.writeLock().unlock();
        }
    }
478514
protected void setSsl(ServiceReference<Object> reference) {
        sslConfigurationRef.setReference(reference);
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(this, tc, "sslRef set to " + reference.getProperty(CONFIG_DISPLAY_ID));
        }
    }
854009
@Override
    public void onCreateProperty(String reference, PropertyRecord prop) {
        closePropertyDialoge();

        String[] tokens = reference.split("_#_");

        ModelNode operation = new ModelNode();
        operation.get(ADDRESS).set(Baseadress.get());
        operation.get(ADDRESS).add("subsystem", "jgroups");
        operation.get(ADDRESS).add("stack", tokens[0]);
        operation.get(ADDRESS).add("protocol", tokens[1]);
        operation.get(OP).set("map-put");
        operation.get(NAME).set("properties");
        operation.get("key").set(prop.getKey());
        operation.get("value").set(prop.getValue());

        dispatcher.execute(new DMRAction(operation), new SimpleCallback<DMRResponse>() {
            @Override
            public void onSuccess(DMRResponse result) {
                ModelNode response = result.get();

                if (response.isFailure()) {
                    Console.error(Console.MESSAGES.addingFailed("Protocol Property"), response.getFailureDescription());
                } else {
                    Console.info(Console.MESSAGES.added("Protocol Property"));

                    loadStacks(true);
                }
            }
        });
    }
1207845
public static <T> T convert(TypeReference<T> reference, Object value) throws ConvertException{
		return convert(reference.getType(), value, null);
	}
1303901
protected void setSerializationService(ServiceReference<SerializationService> ref) {
        if (TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
            LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, "setSerializationService", "setting " + ref);
        }
        serializationServiceRef.setReference(ref);
    }
634474
public Impl link(@Nullable CharSequence ref, @Nullable Link link) {
        if (StringUtils.isNotEmpty(ref) && link != null) {
            List<Link> links = this.linkMap.computeIfAbsent(ref, charSequence -> new ArrayList<>());
            links.add(link);
        }
        return (Impl) this;
    }
1104219
public String getRefCollectionType(Reference ref) {
		String type = ref.getCollectionType();
		return (type == null ? "set" : type.toLowerCase());
	}
332576
void maybePrepareCall(Reference ref) {
    CallSiteType callSiteType = classifyCallSite(ref);
    callSiteType.prepare(this, ref);
  }
1326488
public boolean bindToVariable(VariableRef ref) {
        String name = ref.getName();
        Variable var = getDeclaredVariable(name);
        
        if (var != null) {
            ref.setType(null);
            ref.setVariable(var);
            mVariableRefs.add(ref);
            return true;
        }
        else {
            return false;
        }
    }
970745
@Reference(name = THREAD_CONTEXT_PROVIDER,
               service = ThreadContextProvider.class,
               cardinality = ReferenceCardinality.MULTIPLE,
               policy = ReferencePolicy.DYNAMIC,
               policyOption = ReferencePolicyOption.GREEDY)
    protected void setThreadContextProvider(ServiceReference<ThreadContextProvider> ref) {
        String threadContextProviderName = (String) ref.getProperty(COMPONENT_NAME);
        threadContextProviders.putReference(threadContextProviderName, ref);
        if (Boolean.TRUE.equals(ref.getProperty(ThreadContextProvider.ALWAYS_CAPTURE_THREAD_CONTEXT)))
            alwaysEnabled.add(threadContextProviderName);
    }
1130742
public Reference setReferenceElement(IIdType theReference) {
    if (theReference != null) {
      setReference(theReference.getValue());
    } else {
      setReference(null);
    }
    return this;
  }
269541
@Reference(name = KEY_GENERATOR, service = DDLGenerationParticipant.class, policy = ReferencePolicy.DYNAMIC, cardinality = ReferenceCardinality.MULTIPLE)
    protected void setGenerator(ServiceReference<DDLGenerationParticipant> ref) {
        generators.addReference(ref);
    }