本文整理了Java中org.jboss.forge.furnace.util.Assert.notNull()
方法的一些代码示例,展示了Assert.notNull()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Assert.notNull()
方法的具体详情如下:
包路径:org.jboss.forge.furnace.util.Assert
类名称:Assert
方法名:notNull
[英]Assert that the given Object is not null
; otherwise, throw an IllegalArgumentException with the given message.
[中]断言给定对象不是null
;否则,使用给定消息抛出IllegalArgumentException。
代码示例来源:origin: org.jboss.forge.furnace/furnace-manager
protected AbstractAddonActionRequest(AddonInfo addonInfo, MutableAddonRepository addonRepository, Furnace furnace)
{
Assert.notNull(addonInfo, "AddonInfo must not be null.");
Assert.notNull(furnace, "Addon Repository must not be null.");
Assert.notNull(furnace, "Furnace must not be null.");
this.addonInfo = addonInfo;
this.furnace = furnace;
this.repository = addonRepository;
}
代码示例来源:origin: org.jboss.forge.addon/maven-impl-projects
public FileResourceModelSource(FileResource<?> fileResource)
{
Assert.notNull(fileResource, "POM Resource may not be null");
this.fileResource = fileResource;
}
代码示例来源:origin: org.jboss.forge.addon/maven-impl
public URLArchetypeCatalogFactory(String name, URL catalogURL, String defaultRepository)
{
super();
Assert.notNull(name, "Name should not be null");
Assert.notNull(catalogURL, "Catalog URL must be specified");
this.name = name;
this.catalogURL = catalogURL;
this.defaultRepository = defaultRepository;
}
代码示例来源:origin: org.jboss.windup.reporting/windup-reporting-api
/**
* Create an instance for the provided rule.
*/
public RuleExecutionInformation(Rule rule)
{
Assert.notNull(rule, "Rule object must not be null");
this.rule = rule;
}
代码示例来源:origin: org.jboss.windup.config/windup-config-api
/**
* Construct a new {@link AbstractRulesetMetadata} instance using the given {@link String} ID.
*/
public AbstractRulesetMetadata(String id)
{
Assert.notNull(id, "Ruleset ID must not be null.");
this.id = id;
}
代码示例来源:origin: org.jboss.forge.addon/projects-api
private StackBuilder(String name)
{
Assert.notNull(name, "Name cannot be null");
this.name = name;
}
代码示例来源:origin: org.jboss.forge.addon/javaee-api
public RestWebXmlConfigurationStrategy(String path)
{
Assert.notNull(path, "Path cannot be null");
this.path = path;
}
代码示例来源:origin: org.jboss.forge.addon/resources-impl
public URLResourceImpl(ResourceFactory factory, URL resource)
{
super(factory, null);
Assert.notNull(resource, "URL resource cannot be null");
this.resource = resource;
}
代码示例来源:origin: org.jboss.forge.addon/facets-impl
protected AbstractFacetEvent(Facet<?> facet)
{
Assert.notNull(facet, "Facet should not be null");
this.facet = facet;
}
代码示例来源:origin: windup/windup
/**
* Create an instance for the provided rule.
*/
public RuleExecutionInformation(Rule rule)
{
Assert.notNull(rule, "Rule object must not be null");
this.rule = rule;
}
代码示例来源:origin: org.jboss.forge.furnace.container/simple-api
/**
* Returns the {@link Addon} for which the given ClassLoader was produced.
*
* @param loader the {@link ClassLoader} this {@link Furnace} runtime can be found
* @return the {@link Addon} for which the given ClassLoader represents
*/
public static Addon getAddon(ClassLoader loader)
{
Assert.notNull(loader, "ClassLoader must not be null");
ContainerEntry containerEntry = started.get(loader);
return containerEntry != null ? containerEntry.addon : null;
}
代码示例来源:origin: windup/windup
@Override
public FileMappingTo to(Class<? extends WindupVertexFrame> type)
{
Assert.notNull(type, "Model type must not be null.");
this.types.add(type);
return this;
}
代码示例来源:origin: org.jboss.forge.furnace/furnace-api
/**
* Returns if the version specified is a SNAPSHOT
*
* @param version cannot be null
* @return true if the version is a SNAPSHOT, false otherwise
*/
public static boolean isSnapshot(Version version)
{
Assert.notNull(version, "Version must not be null.");
return version.toString().endsWith(SNAPSHOT_SUFFIX);
}
代码示例来源:origin: org.jboss.forge.addon/facets-impl
@Override
public <FACETEDTYPE extends Faceted<?>, FACETTYPE extends Facet<FACETEDTYPE>> boolean install(FACETEDTYPE origin,
FACETTYPE facet, Predicate<FACETTYPE> filter) throws IllegalArgumentException, IllegalStateException
{
Assert.notNull(origin, "Origin instance must not be null.");
Assert.notNull(facet, "Facet instance must not be null.");
Set<Class<FACETTYPE>> seen = new LinkedHashSet<>();
return install(seen, origin, facet, filter);
}
代码示例来源:origin: org.jboss.forge.addon/ui-api
/**
* Create a new {@link UICommandMetadata} for the given {@link UICommand} type.
*/
public static Metadata forCommand(Class<?> type)
{
Assert.notNull(type, "UICommand type must not be null.");
return new Metadata(type);
}
代码示例来源:origin: windup/windup
/**
* Optionally specify the variable name to use for the output of this condition
*/
public ConditionBuilder as(String variable)
{
Assert.notNull(variable, "Variable name must not be null.");
this.setOutputVariablesName(variable);
return this;
}
代码示例来源:origin: windup/windup
/**
* Output the results using the provided variable name.
*/
public ConditionBuilder as(String variable)
{
Assert.notNull(variable, "Variable name must not be null.");
this.setOutputVariablesName(variable);
return this;
}
代码示例来源:origin: org.jboss.forge.addon/facets-impl
private <FACETEDTYPE extends Faceted<?>, FACETTYPE extends Facet<FACETEDTYPE>> Iterable<FACETTYPE> createFacets(
Class<FACETTYPE> type)
{
Assert.notNull(type, "Facet type must not be null.");
Imported<FACETTYPE> instances = getAddonRegistry().getServices(type);
Set<FACETTYPE> facets = new HashSet<>();
for (FACETTYPE instance : instances)
{
facets.add(instance);
}
return facets;
}
代码示例来源:origin: org.jboss.forge.addon/projects-impl
@Override
public void store(Project project)
{
Assert.notNull(project, "Project should not be null");
this.projects.put(project.getRoot().getFullyQualifiedName(), project);
}
代码示例来源:origin: org.jboss.forge.addon/testing-api
@Override
public boolean install()
{
Assert.notNull(frameworkVersion, "You should pick testing framework version before installing this facet");
final DependencyFacet dependencyFacet = getDependencyFacet();
getMatchingDependencies(dependencyFacet.getDependencies())
.forEach(dependencyFacet::removeDependency);
dependencyFacet.addDirectDependency(buildFrameworkDependency().setVersion(frameworkVersion));
return true;
}
内容来源于网络,如有侵权,请联系作者删除!