Determines whether the given name is a valid qualified name.
556529
public static boolean isValidQualifiedName(FeatureSet mode, String name) {
    if (name.endsWith(".") || name.startsWith(".")) {
      return false;
    }

    List<String> parts = Splitter.on('.').splitToList(name);
    for (String part : parts) {
      if (!isValidPropertyName(mode, part)) {
        return false;
      }
    }
    return isValidSimpleName(parts.get(0));
  }
330302
public static boolean isValidFileName (String name) {
		try {
			if (OsUtils.isWindows()) {
				if (name.contains(">") || name.contains("<")) return false;
				name = name.toLowerCase(); //Windows is case insensitive
			}
			return new File(name).getCanonicalFile().getName().equals(name);
		} catch (Exception e) {
			return false;
		}
	}
732315
private void computeQualifiedName() {
    if (parent != null) {
      qualifiedName = parent.qualifiedName + "." + field.getName();
    } else {
      qualifiedName = field.getName();
    }
  }
549452
def qualified_name(self):
        
        idxstr = '' if self.index is None else str(self.index)
        return "%s[%s]" % (self.qualified_package_name, idxstr)
366914
def assert_valid_name(name: str) -> str:
    """"""
    error = is_valid_name_error(name)
    if error:
        raise error
    return name
9660
def name_valid?(profile_name, profile_base_path)
      unless valid_puppet_class_name?(profile_name)
        error _('wizard.profile.invalid_name')%{words: Bebox::RESERVED_WORDS.join(', ')}
        return false
      end
      return true if profile_base_path.empty?
      # Check if the path name is valid
      unless Bebox::Profile.valid_pathname?(profile_base_path)
        error _('wizard.profile.invalid_path')%{words: Bebox::RESERVED_WORDS.join(', ')}
        return false
      end
      true
    end
343355
static boolean isValidPropertyName(FeatureSet mode, String name) {
    if (isValidSimpleName(name)) {
      return true;
    } else {
      return mode.has(Feature.KEYWORDS_AS_PROPERTIES) && TokenStream.isKeyword(name);
    }
  }
1036615
def qualified_name(obj):
    """"""
    try:
        module = obj.__module__
        qualname = obj.__qualname__
    except AttributeError:
        type_ = type(obj)
        module = type_.__module__
        qualname = type_.__qualname__

    return qualname if module in ('typing', 'builtins') else '{}.{}'.format(module, qualname)
10104
public static boolean isValidJavaIdentifier(String name) {
        if (isBlank(name)) {
            return false;
        }

        final char[] chars = name.toCharArray();
        if (!Character.isJavaIdentifierStart(chars[0])) {
            return false;
        }

        for (char c : chars) {
            if (!Character.isJavaIdentifierPart(c)) {
                return false;
            }
        }

        return true;
    }
1077061
def validate_name(ctx, param, value):
    """"""
    if not value:
        value = os.path.basename(ctx.params['directory'].rstrip(os.path.sep))
    return value
922639
void validateAffiliationNames(String name) throws InvalidArgumentException {
        checkFormat(name);
        if (name.startsWith(".")) {
            throw new InvalidArgumentException("Affiliation name cannot start with a dot '.'");
        }
        if (name.endsWith(".")) {
            throw new InvalidArgumentException("Affiliation name cannot end with a dot '.'");
        }
        for (int i = 0; i < name.length(); i++) {
            if ((name.charAt(i) == '.') && (name.charAt(i) == name.charAt(i - 1))) {
                throw new InvalidArgumentException("Affiliation name cannot contain multiple consecutive dots '.'");
            }
        }
    }
352873
boolean isValidPackageName(String s) {
        int index;
        while ((index = s.indexOf('.')) != -1) {
            if (!isValidClassName(s.substring(0, index))) return false;
            s = s.substring(index+1);
        }
        return isValidClassName(s);
    }
1220738
private boolean matchesQualifiedName(String qname, int endIndex) {
    int start = qname.lastIndexOf('.', endIndex - 1) + 1;

    switch (this.getToken()) {
      case NAME:
        String name = getString();
        return start == 0 && !name.isEmpty() && name.length() == endIndex && qname.startsWith(name);
      case THIS:
        return start == 0 && 4 == endIndex && qname.startsWith("this");
      case SUPER:
        return start == 0 && 5 == endIndex && qname.startsWith("super");
      case GETPROP:
        String prop = getLastChild().getString();
        return start > 1
            && prop.length() == endIndex - start
            && prop.regionMatches(0, qname, start, endIndex - start)
            && getFirstChild().matchesQualifiedName(qname, start - 1);

      case MEMBER_FUNCTION_DEF:
        // These are explicitly *not* qualified name components.
      default:
        return false;
    }
  }
1298977
private boolean isValidMsgName(Node nameNode) {
    if (nameNode.isName() || nameNode.isStringKey()) {
      return nameNode.getString().startsWith("MSG_");
    } else if (nameNode.isQualifiedName()) {
      return nameNode.getLastChild().getString().startsWith("MSG_");
    } else {
      return false;
    }
  }
303515
public static boolean isValid(String name) {
		char[] nameChars = name.toCharArray();
		for (int i = 0; i < nameChars.length; i++) {
			boolean valid = i == 0 ? Character.isJavaIdentifierStart(nameChars[i]) : Character.isJavaIdentifierPart(nameChars[i]);
			if (!valid) {
				return valid;
			}
		}
		return true;
	}
415441
private String ensureQualified(String name) {
        String qualifier = String.format("%s.", this.modelInfo.getName());
        if (!name.startsWith(qualifier)) {
            return String.format("%s%s", qualifier, name);
        }

        return name;
    }
249591
private boolean requiresFullyQualifiedName() {
        String currentPackage = PackageScope.get();
        if (currentPackage != null) {
            if (definition != null && definition.getPackageName() != null && definition.getFullyQualifiedName() != null) {
                String conflictingFQCN = getDefinition().getFullyQualifiedName().replace(definition.getPackageName(), currentPackage);
                if (!conflictingFQCN.equals(getFullyQualifiedName()) && DefinitionRepository.getRepository().getDefinition(conflictingFQCN) != null) {
                    return true;
                }
            }
        }

        Map<String, String> referenceMap = DefinitionRepository.getRepository().getReferenceMap();
        if (referenceMap != null && referenceMap.containsKey(definition.getName())) {
            String fqn = referenceMap.get(definition.getName());
            if (!getDefinition().getFullyQualifiedName().equals(fqn)) {
                return true;
            }
        }
        return false;
    }