public static function nameToClass($name, $type)
    {
        if (!isset(self::$masks[$type])) {
            throw new InvalidArgumentException(
                "Invalid mask type " . $type . "!"
            );
        }
        return str_replace("*", $name, self::$masks[$type]);
    }