List of usage examples for org.springframework.util Assert hasText
@Deprecated public static void hasText(@Nullable String text)
From source file:com.zai360.portal.util.SpringUtils.java
/** * ?/*ww w . j av a 2 s. c o m*/ * * @param name * Bean?? * @param type * Bean * @return */ public static <T> T getBean(String name, Class<T> type) { Assert.hasText(name); Assert.notNull(type); return applicationContext.getBean(name, type); }
From source file:de.olivergierke.whoops.core.Instrument.java
public Instrument(String issuer) { Assert.hasText(issuer); this.issuer = issuer; }
From source file:com.siyanda.designpatterns.test.AdapterTest.java
@Test public void adapterTesting() { Assert.hasText("Class adapter test"); TemperatureInfo tempInfo = new TemperatureClassReporter(); testTempInfo(tempInfo);//from w ww. j av a2 s.c om Assert.hasText("nobject adapter test"); tempInfo = new TemperatureObjectReporter(); testTempInfo(tempInfo); }
From source file:com.ellin.gf8.demo.model.EmailAddress.java
/** * Returns whether the given value is a valid {@link com.ellin.gf8.demo.model.EmailAddress}. * * @param source must not be {@literal null} or empty. * @return//from www . ja v a 2 s . c o m */ public static boolean isValid(String source) { Assert.hasText(source); return PATTERN.matcher(source).matches(); }
From source file:com.iterzp.momo.utils.JsonUtils.java
/** * JSON?//from w ww . j a v a 2 s . co m * * @param json * JSON * @param typeReference * * @return */ public static <T> T toObject(String json, TypeReference<?> typeReference) { Assert.hasText(json); Assert.notNull(typeReference); try { return mapper.readValue(json, typeReference); } catch (Exception e) { e.printStackTrace(); } return null; }
From source file:org.opencredo.demos.twityourl.TextStatistics.java
public TextStatistics(String text, long total) { Assert.hasText(text); Assert.isTrue(total >= 0); this.total = total; this.text = text; }
From source file:se.vgregion.mobile.types.PrinterQueue.java
public PrinterQueue(String name) { Assert.hasText(name); this.id = UUID.randomUUID(); this.name = name; }
From source file:se.vgregion.mobile.types.Facility.java
public Facility(String id, String name, Position position) { Assert.hasText(id); Assert.hasText(name);/*from w w w .j a v a2 s . c om*/ Assert.notNull(position); this.id = id; this.name = name; this.position = position; }
From source file:com.francetelecom.clara.cloud.techmodel.cf.services.userprovided.ServiceNameBuilder.java
private void setValue(String value) { Assert.hasText(value); this.value = value; }
From source file:cn.howardliu.mongodb.spring.Customer.java
public Customer(String firstname, String lastname) { Assert.hasText(firstname); Assert.hasText(lastname);/*from w ww.j a v a2 s. com*/ this.firstname = firstname; this.lastname = lastname; }