/*
Creates a specific ControlledVocabulary subclass
and adds to the new model
548725
private ControlledVocabulary convertAndAddVocabulary(openControlledVocabulary value,
			Level2Element parent, Model newModel, PropertyEditor newEditor)
	{
		String id = ((BioPAXElement) value).getUri();

		if (!newModel.containsID(id)) {
			if (newEditor != null) {
				newModel.addNew(newEditor.getRange(), id);
				// copy properties
				traverse(value, newModel);
			} else {
				log.warn("Cannot Convert CV: " + value + " (for prop.: " + newEditor + ")");
			}
		} 
		
		return (ControlledVocabulary) newModel.getByID(id);
	}
981541
def add_object(self, obj):
        

        # delegate to SchemaType object
        schema_generator = self._get_generator_for_object(obj)
        schema_generator.add_object(obj)

        # return self for easy method chaining
        return self
807749
static <T> KryoSerializerSnapshotData<T> createFrom(
		Class<T> typeClass,
		LinkedHashMap<Class<?>, SerializableSerializer<?>> defaultKryoSerializers,
		LinkedHashMap<Class<?>, Class<? extends Serializer<?>>> defaultKryoSerializerClasses,
		LinkedHashMap<String, KryoRegistration> kryoRegistrations) {

		return new KryoSerializerSnapshotData<>(
			typeClass,
			optionalMapOf(defaultKryoSerializers, Class::getName),
			optionalMapOf(defaultKryoSerializerClasses, Class::getName),
			optionalMapOf(kryoRegistrations, Function.identity()));
	}
246612
@Override
    public void createControlAdapter()
    {
        if (tc.isEntryEnabled())
            SibTr.entry(tc, "createControlAdapter");
        controlAdapter = new ForeignDestination(messageProcessor, this);
        if (tc.isEntryEnabled())
            SibTr.exit(tc, "createControlAdapter", controlAdapter);
    }
632817
@JRubyMethod
    public static IRubyObject add_type(IRubyObject self, IRubyObject taguri, IRubyObject cls) {
        IRubyObject tags = self.callMethod(self.getRuntime().getCurrentContext(), "tags");
        ((RubyHash)tags).fastASet(taguri, cls);
        return self.getRuntime().getNil();
    }
367386
@SuppressWarnings("static-method")
	protected ExtraLanguageTypeConverter createTypeConverterInstance(
			IExtraLanguageConversionInitializer initializer,
			IExtraLanguageGeneratorContext context) {
		return new ExtraLanguageTypeConverter(initializer, context);
	}
738327
function addVocabAsProperties(schema, terms_array) {
  if (!schema.properties) schema.properties = {};
  var propertySchema = schema.propertySchema || {};
  _.each(terms_array, function(term) {
    schema.properties[term] = vocab(term)
    if (propertySchema) {
      if (propertySchema.known) {
        propertySchema.known.push(term);
      }
      if (propertySchema.enum) {
        propertySchema.enum.push(term);
      }
    }
  });
}
624456
@Override
    public void createControlAdapter() {
        if (TraceComponent.isAnyTracingEnabled()
            && tc.isEntryEnabled())
            SibTr.entry(tc, "createControlAdapter");
        _controlAdapter = new MessageProcessorControl(this);
        if (TraceComponent.isAnyTracingEnabled()
            && tc.isEntryEnabled())
            SibTr.exit(tc, "createControlAdapter");
    }
1088046
def create_extras(cls: Type[T],
                  extras: Dict[str, Any]) -> Dict[str, Any]:
    
    subextras: Dict[str, Any] = {}
    if hasattr(cls, "from_params"):
        from_params_method = cls.from_params  # type: ignore
    else:
        # In some rare cases, we get a registered subclass that does _not_ have a
        # from_params method (this happens with Activations, for instance, where we
        # register pytorch modules directly).  This is a bit of a hack to make those work,
        # instead of adding a `from_params` method for them somehow. Then the extras
        # in the class constructor are what we are looking for, to pass on.
        from_params_method = cls
    if takes_kwargs(from_params_method):
        # If annotation.params accepts **kwargs, we need to pass them all along.
        # For example, `BasicTextFieldEmbedder.from_params` requires a Vocabulary
        # object, but `TextFieldEmbedder.from_params` does not.
        subextras = extras
    else:
        # Otherwise, only supply the ones that are actual args; any additional ones
        # will cause a TypeError.
        subextras = {k: v for k, v in extras.items()
                     if takes_arg(from_params_method, k)}
    return subextras
308267
@Override
	public void setup(AbstractInvokable parent) {
		@SuppressWarnings("unchecked")
		final GenericCollectorMap<IT, OT> mapper =
			RegularPactTask.instantiateUserCode(this.config, userCodeClassLoader, GenericCollectorMap.class);
		this.mapper = mapper;
		mapper.setRuntimeContext(getUdfRuntimeContext());
	}
1113777
def _from_dict(cls, _dict):
        """"""
        args = {}
        if 'customization_id' in _dict:
            args['customization_id'] = _dict.get('customization_id')
        else:
            raise ValueError(
                'Required property \'customization_id\' not present in VoiceModel JSON'
            )
        if 'name' in _dict:
            args['name'] = _dict.get('name')
        if 'language' in _dict:
            args['language'] = _dict.get('language')
        if 'owner' in _dict:
            args['owner'] = _dict.get('owner')
        if 'created' in _dict:
            args['created'] = _dict.get('created')
        if 'last_modified' in _dict:
            args['last_modified'] = _dict.get('last_modified')
        if 'description' in _dict:
            args['description'] = _dict.get('description')
        if 'words' in _dict:
            args['words'] = [Word._from_dict(x) for x in (_dict.get('words'))]
        return cls(**args)
839111
protected <S extends Storable> GenericEncodingStrategy<S> createStrategy
        (Class<S> type, StorableIndex<S> pkIndex)
        throws SupportException
    {
        return new GenericEncodingStrategy<S>(type, pkIndex);
    }
876385
protected PyFeatureCallGenerator newFeatureCallGenerator(IExtraLanguageGeneratorContext context, IAppendable it) {
		return new PyFeatureCallGenerator(context, (ExtraLanguageAppendable) it);
	}
444593
private void addAndPrepareControlledObject(Authorizable controlledObject)
    {
        controlledObjects.add(new WeakReference<Authorizable>(controlledObject));

        // Properly configure the new object
        boolean authorize = shouldAuthorize(getLastAuthentication(), controlledObject);
        updateControlledObject(controlledObject, authorize);
    }
998017
def create(controller_id, name):
        """"""
        def _decorator(cls):
            class _ControllerClass(cls, Controller):
                def __init__(self):
                    Controller.__init__(self, controller_id, name)
                    for key in cls.__dict__.keys():
                        prop = cls.__dict__[key]
                        if isinstance(prop, KerviValue):
                            if prop.is_input:
                                self.inputs._add_internal(key, prop)
                            else:
                                self.outputs._add_internal(key, prop)
                    cls.__init__(self)
            return _ControllerClass
        return _decorator
1229699
def createEditor(self, parent, option, index):
        """"""
        # bring up separate window for component parameters
        view = parent.parentWidget()
        component = view.model().data(index)

        if component is not None:
            editor = component.showEditor()
        else:
            print 'delegate data type', type(component)
            raise Exception('UnknownDelegateType')

        # connect editor to update defaults
        editor.attributesSaved.connect(view.updateDefaults)
        editor.attributesSaved.connect(view.somethingChanged)

        if component.name == 'Vocalization':
            # find any associated file auto-parameters
            files = view.model().autoParams().findFileParam(component)
            if files is not None:
                editor.selectMany(files)
            editor.vocalFilesChanged.connect(view.updateVocalAuto)

        return editor
1323562
public void add(ManagedObject managedObject,
                    boolean requiresCurrentCheckpoint)
                    throws ObjectManagerException
    {
        final String methodName = "add";
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this,
                        cclass,
                        methodName,
                        new Object[] { managedObject, new Boolean(requiresCurrentCheckpoint) });

        super.add(managedObject, requiresCurrentCheckpoint);

        inMemoryManagedObjects.put(new Long(managedObject.owningToken.storedObjectIdentifier),
                                   managedObject);

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this,
                       cclass,
                       methodName);
    }