Tabnine Logo
InitializrConfiguration.hasInvalidChar
Code IndexAdd Tabnine to your IDE (free)

How to use
hasInvalidChar
method
in
io.spring.initializr.metadata.InitializrConfiguration

Best Java code snippets using io.spring.initializr.metadata.InitializrConfiguration.hasInvalidChar (Showing top 2 results out of 315)

origin: spring-io/initializr

/**
 * Clean the specified package name if necessary. If the package name cannot be
 * transformed to a valid package name, the {@code defaultPackageName} is used
 * instead.
 * <p>
 * The package name cannot be cleaned if the specified {@code packageName} is
 * {@code null} or if it contains an invalid character for a class identifier.
 * @param packageName the package name
 * @param defaultPackageName the default package name
 * @return the cleaned package name
 * @see Env#getInvalidPackageNames()
 */
public String cleanPackageName(String packageName, String defaultPackageName) {
  if (!StringUtils.hasText(packageName)) {
    return defaultPackageName;
  }
  String candidate = cleanPackageName(packageName);
  if (hasInvalidChar(candidate.replace(".", ""))
      || this.env.invalidPackageNames.contains(candidate)) {
    return defaultPackageName;
  }
  else {
    return candidate;
  }
}
origin: spring-io/initializr

if (hasInvalidChar(candidate)
    || this.env.invalidApplicationNames.contains(candidate)) {
  return this.env.fallbackApplicationName;
io.spring.initializr.metadataInitializrConfigurationhasInvalidChar

Popular methods of InitializrConfiguration

  • getEnv
  • <init>
  • cleanPackageName
    Clean the specified package name if necessary. If the package name cannot be transformed to a valid
  • generateApplicationName
    Generate a suitable application name based on the specified name. If no suitable application name ca
  • merge
  • splitCamelCase
  • unsplitWords
  • validate

Popular in Java

  • Making http post requests using okhttp
  • setRequestProperty (URLConnection)
  • putExtra (Intent)
  • scheduleAtFixedRate (Timer)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now