Sets module type
@param {string} type
777619
function(type) {
		//define if put type is present in config
		if (config.moduleTypes.indexOf(type) > -1) {
            config.moduleType = type;
            fs.writeFile(path.resolve(__dirname, 'config.json'), JSON.stringify(config, null, 4), 'utf8', function (err) {
                if (err) {
                    return console.log(err);
                }
            });
		} else {
			return console.log('Wrong type, available types: %j', config.moduleTypes);
		}
	}
738928
public function set_type($type = self::TYPE_INFO) {
        if (in_array($type, array(self::TYPE_OK, self::TYPE_ERROR, self::TYPE_INFO))) {
            $this->type = $type;
        } else {
            throw new coding_exception('Unknown message type.');
        }
    }
1368565
public Tree setType(Class<?> type) {
		if (value == null || value.getClass() == type) {
			return this;
		}
		value = DataConverterRegistry.convert(type, value);
		if (parent != null && key != null) {
			if (key instanceof String) {
				parent.putObjectInternal((String) key, value, false);
			} else {
				parent.remove((int) key);
				parent.insertObjectInternal((int) key, value);
			}
		}
		return this;
	}
945160
public function setType($type)
    {
        if (gettype($type) === 'string') {
            $this->type = $type;
        } else {
            $msg = "Type must be a string, '" . gettype($type) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
636657
private void setType(String type) {
        requireArgument(type != null && !type.trim().isEmpty(), "Type cannot be null or empty.");
        _type = type;
    }
941647
@SuppressWarnings("unchecked")
    public <T extends WebLocatorAbstractBuilder> T setType(final String type) {
        pathBuilder.setType(type);
        return (T) this;
    }
763244
public void setType(final Type type) {
		getOrCreateComponentModel().type = type == null ? Type.TABLE : type;
	}
883681
def p_set_type(self, p):
        ''''''
        p[0] = ast.SetType(value_type=p[3], annotations=p[5])
1020910
public function setType(Type $type = null)
    {
        if ($this->type !== $type) {
            $this->type = $type;
        }

        return $this;
    }
692434
public void setNodeType(NodeType type) {
        addField(ConfigureNodeFields.node_type, FormField.Type.list_single);
        setAnswer(ConfigureNodeFields.node_type.getFieldName(), getListSingle(type.toString()));
    }
1219855
def module(self, value):
        

        if value is not None:
            assert type(value) is type(sys), "'{0}' attribute: '{1}' type is not 'module'!".format("module", value)
        self.__module = value
1141078
void setDataType(Session session, Type type) {

        if (opType == OpTypes.VALUE) {
            valueData = type.convertToType(session, valueData, dataType);
        }

        dataType = type;
    }
344212
function(type, args, obj) {
            var val = Lang.merge(DEFAULT_CONFIG.STRINGS.value, args[0]);
            this.cfg.setProperty(DEFAULT_CONFIG.STRINGS.key, val, true);
        }
52729
def set_type(self):
        
        if self.device_info['type'] == 'Router':
            self.node['type'] = self.device_info['model'].upper()
        else:
            self.node['type'] = self.device_info['type']
1180360
private void setTypeString(final String type) {
        if (type == null) {
            this.type = null;
        } else if (type.equalsIgnoreCase("WARN")) {
            this.type = Type.WARN;
        } else if (type.equalsIgnoreCase("ERROR")) {
            this.type = Type.ERROR;
        } else if (type.equalsIgnoreCase("DEBUG")) {
            this.type = Type.DEBUG;
        } else if (type.equalsIgnoreCase("INFO")) {
            this.type = Type.INFO;
        }
    }
97187
public function setType($type)
    {
      if(!is_string($type) || strlen(trim($type)) == 0)
        throw new InvalidArgumentException(__METHOD__ . '; Invalid type, must be a non empty string');

      $this->type = $type;
    }
466986
function addType(typeName, type) {
	if (types[typeName]) {
		throw new Error("Type already registered '" + typeName + "'");
	}
	types[typeName] = type;
}