本文整理了Java中org.springframework.lang.NonNull
类的一些代码示例,展示了NonNull
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NonNull
类的具体详情如下:
包路径:org.springframework.lang.NonNull
类名称:NonNull
暂无
代码示例来源:origin: codingapi/tx-lcn
/**
* spi classes
*
* @param importingClassMetadata importingClassMetadata
* @return String[]
*/
@Override
@NonNull
public String[] selectImports(@NonNull AnnotationMetadata importingClassMetadata) {
return new String[]{"com.codingapi.txlcn.spi.MessageConfiguration",
"com.codingapi.txlcn.client.spi.SleuthConfiguration"};
}
}
代码示例来源:origin: spring-projects/spring-framework
/**
* Return the description of the resource that the bean definition came from.
*/
@Override
@NonNull
public String getResourceDescription() {
return String.valueOf(super.getResourceDescription());
}
代码示例来源:origin: spring-projects/spring-framework
/**
* Return the name of the bean.
*/
@Override
@NonNull
public String getBeanName() {
return String.valueOf(super.getBeanName());
}
代码示例来源:origin: spring-projects/spring-framework
@Override
@NonNull
public String getPath() {
return this.path.getPath();
}
代码示例来源:origin: spring-projects/spring-framework
@NonNull
private static List<MediaType> acceptedMediaTypes(ServerRequest.Headers headers) {
List<MediaType> acceptedMediaTypes = headers.accept();
if (acceptedMediaTypes.isEmpty()) {
acceptedMediaTypes = Collections.singletonList(MediaType.ALL);
}
else {
MediaType.sortBySpecificityAndQuality(acceptedMediaTypes);
}
return acceptedMediaTypes;
}
代码示例来源:origin: org.springframework/spring-beans
/**
* Return the description of the resource that the bean definition came from.
*/
@Override
@NonNull
public String getResourceDescription() {
return String.valueOf(super.getResourceDescription());
}
代码示例来源:origin: org.springframework/spring-web
@Override
@NonNull
public String getPath() {
return this.path.getPath();
}
代码示例来源:origin: org.springframework/spring-beans
/**
* Return the name of the bean.
*/
@Override
@NonNull
public String getBeanName() {
return String.valueOf(super.getBeanName());
}
代码示例来源:origin: spring-projects/spring-framework
/**
* Pre-checks the arguments, calls {@link #doTranslate}, and invokes the
* {@link #getFallbackTranslator() fallback translator} if necessary.
*/
@Override
@NonNull
public DataAccessException translate(String task, @Nullable String sql, SQLException ex) {
Assert.notNull(ex, "Cannot translate a null SQLException");
DataAccessException dae = doTranslate(task, sql, ex);
if (dae != null) {
// Specific exception match found.
return dae;
}
// Looking for a fallback...
SQLExceptionTranslator fallback = getFallbackTranslator();
if (fallback != null) {
dae = fallback.translate(task, sql, ex);
if (dae != null) {
// Fallback exception match found.
return dae;
}
}
// We couldn't identify it more precisely.
return new UncategorizedSQLException(task, sql, ex);
}
代码示例来源:origin: spring-projects/spring-security
@NonNull
@Override
public Object resolveArgument(MethodParameter parameter,
代码示例来源:origin: spring-projects/spring-integration
@Override
@NonNull // override
Message<?> toMessage(byte[] bytes, @Nullable Map<String, Object> headers);
代码示例来源:origin: spring-projects/spring-integration
@Override
public void setBeanFactory(@NonNull BeanFactory beanFactory) {
super.setBeanFactory(beanFactory);
this.delegate.setBeanFactory(beanFactory);
}
代码示例来源:origin: spring-projects/spring-integration
@Override
public void setBeanFactory(@NonNull BeanFactory beanFactory) {
super.setBeanFactory(beanFactory);
this.delegate.setBeanFactory(beanFactory);
}
代码示例来源:origin: spring-projects/spring-kafka
@KafkaHandler
public void bar(@NonNull String bar) {
if ("junk".equals(bar)) {
throw new RuntimeException("intentional");
}
else {
this.latch1.countDown();
}
}
代码示例来源:origin: spring-projects/spring-integration
@Override
public void setBeanFactory(@NonNull BeanFactory beanFactory) {
super.setBeanFactory(beanFactory);
((DefaultMessageHandlerMethodFactory) this.messageHandlerMethodFactory).setBeanFactory(beanFactory);
if (beanFactory instanceof ConfigurableListableBeanFactory) {
BeanExpressionResolver beanExpressionResolver = ((ConfigurableListableBeanFactory) beanFactory)
.getBeanExpressionResolver();
if (beanExpressionResolver != null) {
this.resolver = beanExpressionResolver;
}
this.expressionContext = new BeanExpressionContext((ConfigurableListableBeanFactory) beanFactory, null);
}
}
代码示例来源:origin: org.springframework.data/spring-data-gemfire
/**
* Returns the {@link String name} of the {@link org.apache.geode.cache.Region}
* in which this {@link PersistentEntity} will be stored.
*
* @return the {@link String name} of the {@link org.apache.geode.cache.Region}
* in which this {@link PersistentEntity} will be stored.
* @see org.apache.geode.cache.Region#getName()
*/
@NonNull
public String getRegionName() {
return this.regionName;
}
代码示例来源:origin: org.springframework.data/spring-data-gemfire
/**
* Returns a reference to the configured {@link GemfireMappingContext mapping context} used to handling mapping
* logic between Pivotal GemFire persistent entities and application domain object {@link Class types}.
*
* @return a reference to the configured {@link GemfireMappingContext mapping context} for Pivotal GemFire.
* @see org.springframework.data.gemfire.mapping.GemfireMappingContext
*/
@NonNull
protected GemfireMappingContext getMappingContext() {
return this.mappingContext;
}
代码示例来源:origin: org.springframework.data/spring-data-gemfire
/**
* Returns an empty {@link Iterable} object.
*
* @param <T> {@link Class} type of the elements in the {@link Iterable}.
* @return an empty {@link Iterable}.
* @see java.lang.Iterable
* @see #nullSafeIterable(Iterable)
*/
@NonNull
public static <T> Iterable<T> emptyIterable() {
return Collections::emptyIterator;
}
代码示例来源:origin: org.springframework.data/spring-data-geode
@NonNull
@SuppressWarnings("unchecked")
QueryPostProcessor<?, String> getQueryPostProcessor() {
return (QueryPostProcessor<?, String>) this.queryPostProcessor;
}
代码示例来源:origin: org.springframework.data/spring-data-geode
/**
* Returns a reference to the configured {@link Logger} used to log {@link String messages}
* about the functions of this {@link PdxSerializer}.
*
* @return a reference to the configured {@link Logger}.
* @see org.slf4j.Logger
*/
@NonNull
protected Logger getLogger() {
return this.logger;
}
内容来源于网络,如有侵权,请联系作者删除!