public SingleVersion(String version) { Assert.notNull(version, "Version must not be null."); this.version = version; }
/** * Discover if a Class <b>c</b> has been annotated with <b>type</b>. This also discovers annotations defined through * a @{@link Stereotype}. * * @param c The class to inspect. * @param type The targeted annotation class * @return True if annotation is present either on class, false if the annotation is not present. */ public static boolean isAnnotationPresent(final Class<?> c, final Class<? extends Annotation> type) { return getAnnotation(c, type) != null; }
/** * Return <code>true</code> if the {@link #getResult()} is not <code>null</code>. */ public boolean hasResult() { return getResult() != null; } }
public void setDependencies(Set<AddonDependency> dependencies) { Assert.notNull(dependencies, "Dependencies must not be null."); this.state.dependencies = Sets.getConcurrentSet(); this.state.dependencies.addAll(dependencies); }
/** * Split up a string into multiple strings based on a delimiter. * * @param string String to split up. * @param delim Delimiter. * @return Array of strings. */ public static String[] split(final String string, final String delim) { return split(string, delim, -1); }
/** * Convert and join an array of objects into one string. * * @param array Array of objects to join as strings. * @return Converted and joined objects. */ public static String join(final Object array[]) { return join(array, null); }
/** * Trim leading whitespace from the given String. * * @param str the string to check * @return the trimmed String * @see java.lang.Character#isWhitespace(char) */ public static String trimLeadingWhitespace(String str) { return trimLeadingCharacter(str, CharacterFilter.WHITESPACE); }
/** * Wrap a constant value into a {@link Callable} instance. */ public static <T> Callable<T> returning(T value) { return new ConstantCallable<T>(value); }
/** * * @param urispec * @return the uri * @throws URISyntaxException for any error */ public static URI toURI(final String urispec) throws URISyntaxException { return toURI(urispec, null); }
private AddonRepositoryImpl(LockManager lock, File dir) { // TODO Assert.notNull(lock, "LockManager must not be null."); Assert.notNull(dir, "Addon directory must not be null."); this.addonDir = dir; this.lock = lock; }
public void setMissingDependencies(Set<AddonDependency> missingDependencies) { Assert.notNull(missingDependencies, "Missing dependencies must not be null."); this.state.missingDependencies = Sets.getConcurrentSet(); this.state.missingDependencies.addAll(missingDependencies); }
private Exported getExported(Class<?> clazz) { return Annotations.getAnnotation(clazz, Exported.class); } }
public Addon setStatus(AddonStatus status) { Assert.notNull(status, "Status must not be null."); this.state.status = status; return this; }
public void setRunnable(AddonRunnable runnable) { Assert.notNull(runnable, "Runnable must not be null."); this.state.runnable = runnable; }
public URLResourceImpl(ResourceFactory factory, URL resource) { super(factory, null); Assert.notNull(resource, "URL resource cannot be null"); this.resource = resource; }
public void setFuture(Future<Void> future) { Assert.notNull(future, "Future must not be null."); this.state.future = future; }
protected URLResourceImpl(ResourceFactory factory, Resource<?> parent, URL resource) { super(factory, parent); Assert.notNull(resource, "URL resource cannot be null"); this.resource = resource; }
public UICategoryImpl(String name, UICategory subCategory) { Assert.notNull(name, "Name must not be null."); this.name = name; this.subCategory = subCategory; }
public Addon setServiceRegistry(ServiceRegistry registry) { Assert.notNull(registry, "Registry must not be null."); this.state.registry = registry; return this; }