Tabnine Logo
ServiceProfile.normalize
Code IndexAdd Tabnine to your IDE (free)

How to use
normalize
method
in
com.asakusafw.yaess.core.ServiceProfile

Best Java code snippets using com.asakusafw.yaess.core.ServiceProfile.normalize (Showing top 2 results out of 315)

origin: asakusafw/asakusafw

/**
 * Returns the target configuration.
 * @param key the configuration key
 * @param mandatory whether the configuration is mandatory
 * @param resolve whether resolves the configuration
 * @return the corresponded configuration, or {@code null} if is not defined/empty
 * @throws IllegalArgumentException if some parameters were {@code null}
 * @since 0.4.0
 */
public String getConfiguration(String key, boolean mandatory, boolean resolve) {
  if (key == null) {
    throw new IllegalArgumentException("key must not be null"); //$NON-NLS-1$
  }
  String value = getConfiguration().get(key);
  return normalize(key, value, mandatory, resolve);
}
origin: asakusafw/asakusafw

private static long extractLong(
    ServiceProfile<?> profile,
    Map<String, String> conf,
    String key,
    long defaultValue) {
  assert profile != null;
  assert conf != null;
  assert key != null;
  String value = profile.normalize(key, conf.remove(key), false, true);
  if (value == null) {
    return defaultValue;
  }
  try {
    return Long.parseLong(value);
  } catch (RuntimeException e) {
    throw new IllegalArgumentException(MessageFormat.format(
        "{0}.{1} must be an integer ({2})",
        profile.getPrefix(),
        key,
        value));
  }
}
com.asakusafw.yaess.coreServiceProfilenormalize

Javadoc

Normalizes the configuration value.

Popular methods of ServiceProfile

  • getConfiguration
    Returns the target configuration.
  • getContext
    Returns the current profile context.
  • getPrefix
    Returns the key prefix of this profile.
  • getServiceClass
    Returns the service class.
  • load
    Loads a service profile with the specified key prefix.
  • newInstance
    Creates a new instance. The created service will automatically Service#configure(ServiceProfile)by u
  • <init>
    Creates a new instance.

Popular in Java

  • Reactive rest calls using spring rest template
  • requestLocationUpdates (LocationManager)
  • onCreateOptionsMenu (Activity)
  • compareTo (BigDecimal)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • JTable (javax.swing)
  • Table (org.hibernate.mapping)
    A relational table
  • Top PhpStorm plugins
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