Codota Logo
Arguments.checkNotNull
Code IndexAdd Codota to your IDE (free)

How to use
checkNotNull
method
in
de.smartics.util.lang.Arguments

Best Java code snippets using de.smartics.util.lang.Arguments.checkNotNull (Showing top 11 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Connection c =
  • Codota IconDataSource dataSource;dataSource.getConnection()
  • Codota IconString url;DriverManager.getConnection(url)
  • Codota IconIdentityDatabaseUtil.getDBConnection()
  • Smart code suggestions by Codota
}
origin: de.smartics.ci/smartics-ci-commons-hudson-config

private void checkArguments(final MavenSettings settings, final MavenPom pom)
 throws NullArgumentException
{
 Arguments.checkNotNull("settings", settings);
 Arguments.checkNotNull("pom", pom);
}
origin: de.smartics.util/smartics-commons

/**
 * Checks if {@code value} is <code>null</code>.
 *
 * @param name the name of the argument of error reporting. Not used if no
 *          exception is thrown. May be <code>null</code>, although not
 *          recommended.
 * @param value the value of the argument to check to be not <code>null</code>
 *          .
 * @throws NullPointerException if {@code value} is <code>null</code>.
 */
public static void checkNotNull(final String name, final Object value)
 throws NullPointerException
{
 checkNotNull(name, value, null);
}
origin: de.smartics.ci/smartics-ci-commons-hudson-config

/**
 * Default constructor.
 *
 * @param locationManager the location manager to load resources.
 * @param loaderConfig the loader configuration to control the loading and
 *          creation of Hudson job configuration files.
 * @throws NullArgumentException if {@code locationManager} or
 *           {@code loaderConfig} is <code>null</code>.
 */
public HudsonJobConfigLoader(final LocationManager locationManager,
  final HudsonJobConfigurationLoaderConfig loaderConfig)
 throws NullArgumentException
{
 Arguments.checkNotNull("locationManager", locationManager);
 Arguments.checkNotNull("loaderConfig", loaderConfig);
 this.locationManager = locationManager;
 this.loaderConfig = loaderConfig;
}
origin: de.smartics.util/smartics-maven-utils

/**
 * Adds the report ID to the list of IDs to render report references.
 *
 * @param reportId the report ID to add.
 * @throws NullArgumentException if {@code reportId} is <code>null</code>.
 */
public void addReportId(final ReportId reportId) throws NullArgumentException
{
 Arguments.checkNotNull("reportId", reportId);
 reportIds.add(reportId);
}
origin: de.smartics.ci/smartics-ci-commons-hudson-config

private static void checkRootElementsMatch(final Element target,
  final Element toBeMerged)
{
 Arguments.checkNotNull("target", target);
 Arguments.checkNotNull("toBeMerged", toBeMerged);
 final String targetName = target.getName();
 final String toBeMergedName = toBeMerged.getName();
 if (!targetName.equals(toBeMergedName))
 {
  throw new IllegalArgumentException(
    "The root element names of the XML subtrees to be merged do not"
      + " match. Target is '" + targetName + "' and toBeMerged is '"
      + toBeMergedName + "'.");
 }
}
origin: de.smartics.ci/smartics-ci-commons-hudson-config

private static void checkArguments(final LoaderPlan plan)
 throws IllegalArgumentException, NullArgumentException
{
 Arguments.checkNotNull("plan", plan);
 if (plan.isEmpty())
 {
  throw new IllegalArgumentException("The loader plan must not be empty.");
 }
}
origin: de.smartics.ci/smartics-ci-commons-hudson-config

/**
 * Default constructor.
 *
 * @param id the identifier of the loader plan.
 * @param mavenConfig the information from the Maven project configuration.
 * @throws BlankArgumentException if {@code id} is blank.
 * @throws NullArgumentException if {@code mavenConfig} is <code>null</code>.
 */
public LoaderPlan(final String id, final MavenConfig mavenConfig)
 throws BlankArgumentException, NullArgumentException
{
 Arguments.checkNotBlank("id", id);
 Arguments.checkNotNull("mavenConfig", mavenConfig);
 this.id = id;
 this.mavenConfig = mavenConfig;
}
origin: de.smartics.ci/smartics-ci-commons-hudson-config

/**
 * Merges the distinct information from the two documents.
 * <p>
 * Note that not the contents of the element is checked to determine if the
 * contents are equal. The merging algorithm simply checks the element names
 * and assumes that two elements are the same, if they have the same name and
 * are on the same level.
 * </p>
 *
 * @param target the document to add information, if missing.
 * @param toBeMerged the information to add to the {@code target}, if missing.
 * @throws NullArgumentException if either {@code target} or
 *           {@code toBeMerged} is <code>null</code>.
 * @throws JDOMException on any problem encountered while merging.
 */
public static void merge(final Document target, final Document toBeMerged)
 throws NullArgumentException, JDOMException
{
 Arguments.checkNotNull("target", target);
 Arguments.checkNotNull("toBeMerged", toBeMerged);
 merge(target.getRootElement(), toBeMerged.getRootElement());
}
origin: de.smartics.ci/smartics-ci-commons-hudson-config

/**
 * Calculates the XPath for the given {@code element}.
 *
 * @param rootElement the root element to the element whose path is to be
 *          calculated. The returned XPath is relative to the element. May be
 *          <code>null</code> if a path from the document root is requested.
 * @param element the element relative to the {@code rootElement}.
 * @return the XPath relative to {@code rootElement} to the {@code element}.
 */
public static String calcXPath(final Element rootElement,
  final Element element)
{
 Arguments.checkNotNull("element", element);
 final StringBuilder buffer = new StringBuilder(32);
 buffer.append(element.getName());
 Element current = element;
 while ((current = current.getParentElement()) != rootElement) // NOPMD
 {
  buffer.insert(0, '/').insert(0, current.getName());
 }
 if (rootElement == null)
 {
  buffer.insert(0, '/');
 }
 return buffer.toString();
}
origin: de.smartics.ci/smartics-ci-commons-hudson-config

/**
 * Loads loader plans read from the given stream.
 *
 * @param inputSource contains an <code>ci-config</code> XML document with
 *          loader information.
 * @return the loader information from the stream. May be empty, if no loader
 *         information has been found, but is never <code>null</code>.
 * @throws NullArgumentException if {@code inputSource} is <code>null</code>.
 */
public List<LoaderPlan> load(final InputSource inputSource)
 throws NullArgumentException
{
 Arguments.checkNotNull("inputSource", inputSource);
 final List<LoaderPlan> loaderPlans = new ArrayList<LoaderPlan>();
 final SAXBuilder builder = new SAXBuilder();
 try
 {
  final Document ciConfigXml = builder.build(inputSource);
  load(loaderPlans, ciConfigXml);
 }
 catch (final Exception e)
 {
  throw new IllegalArgumentException("Cannot load loader plan from '"
                    + inputSource.getSystemId() + "'.", e);
 }
 return loaderPlans;
}
origin: de.smartics.util/smartics-maven-utils

Arguments.checkNotNull("reportId", reportId);
de.smartics.util.langArgumentscheckNotNull

Javadoc

Checks if value is null.

Popular methods of Arguments

  • checkNotBlank
    Checks if value is blank providing an additional message.
  • checkNotBlankExceptNull
    Checks if value is blank except null providing an additional message.

Popular in Java

  • Updating database using SQL prepared statement
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getContentResolver (Context)
  • addToBackStack (FragmentTransaction)
  • ObjectMapper (com.fasterxml.jackson.databind)
    This mapper (or, data binder, or codec) provides functionality for converting between Java objects (
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • TreeSet (java.util)
    A NavigableSet implementation based on a TreeMap. The elements are ordered using their Comparable, o
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now