本文整理了Java中org.ldp4j.commons.testing.Utils.isUtilityClass()
方法的一些代码示例,展示了Utils.isUtilityClass()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.isUtilityClass()
方法的具体详情如下:
包路径:org.ldp4j.commons.testing.Utils
类名称:Utils
方法名:isUtilityClass
[英]Determine whether a class is a proper utility class (final class + private no-arg constructor).
[中]确定一个类是否是一个合适的实用程序类(final class+private no arg构造函数)。
代码示例来源:origin: ldp4j/ldp4j
@Test
public void testIsLibrary$notUtilityClass$methodClass() {
final class NotStaticMethodClass {
}
assertThat(Utils.isUtilityClass(NotStaticMethodClass.class),equalTo(false));
}
代码示例来源:origin: ldp4j/ldp4j
@Test
public void verifyIsUtilityClass() throws ClassNotFoundException {
Class<?> innerClass = Thread.currentThread().getContextClassLoader().loadClass(ApplicationContext.class.getCanonicalName()+"$ApplicationEngineSingleton");
assertThat(Utils.isUtilityClass(innerClass),equalTo(true));
}
代码示例来源:origin: ldp4j/ldp4j
@Test
public void isUtilityClass() throws Exception {
assertThat(Utils.isUtilityClass(ContentNegotiation.class),equalTo(true));
}
代码示例来源:origin: ldp4j/ldp4j
@Test
public void verifyIsUtilityClass() {
assertThat(Utils.isUtilityClass(Literals.class),equalTo(true));
}
代码示例来源:origin: ldp4j/ldp4j
@Test
public void isUtilityClass() throws Exception {
assertThat(Utils.isUtilityClass(HttpUtils.class),equalTo(true));
}
代码示例来源:origin: ldp4j/ldp4j
@Test
public void testIsLibrary$notUtilityClass$notFinalClass() {
assertThat(Utils.isUtilityClass(CustomObject.class),equalTo(false));
}
代码示例来源:origin: ldp4j/ldp4j
@Test
public void isUtilityClass() throws Exception {
assertThat(Utils.isUtilityClass(ContentNegotiationUtils.class),equalTo(true));
}
代码示例来源:origin: ldp4j/ldp4j
@Test
public void verifyIsUtilityClass() {
assertThat(Utils.isUtilityClass(QuerySupport.class),equalTo(true));
}
代码示例来源:origin: ldp4j/ldp4j
@Test
public void isUtilityClass() throws Exception {
assertThat(Utils.isUtilityClass(Qualities.class),equalTo(true));
}
代码示例来源:origin: ldp4j/ldp4j
@Test
public void isUtilityClass() throws Exception {
assertThat(Utils.isUtilityClass(MoreStrings.class),equalTo(true));
}
代码示例来源:origin: ldp4j/ldp4j
@Test
public void isUtilityClass() throws Exception {
assertThat(Utils.isUtilityClass(Variants.class),equalTo(true));
}
代码示例来源:origin: ldp4j/ldp4j
@Test
public void testIsLibrary$notUtilityClass$notStaticClass() {
assertThat(Utils.isUtilityClass(NonStaticClass.class),equalTo(false));
}
代码示例来源:origin: ldp4j/ldp4j
@Test
public void testIsLibrary$notUtilityClass$innerClass() {
assertThat(Utils.isUtilityClass(NotStaticInnerClass.class),equalTo(false));
}
代码示例来源:origin: ldp4j/ldp4j
@Test
public void testIsLibrary$notUtilityClass$constructorWithArgs() {
assertThat(Utils.isUtilityClass(CustomHashObject.class),equalTo(false));
}
代码示例来源:origin: ldp4j/ldp4j
@Test
public void isUtilityClass() throws Exception {
assertThat(Utils.isUtilityClass(CharacterEncodings.class),equalTo(true));
}
代码示例来源:origin: ldp4j/ldp4j
@Test
public void verifyIsUtilityClass() {
assertThat(Utils.isUtilityClass(DataDSL.class),equalTo(true));
}
代码示例来源:origin: ldp4j/ldp4j
@Test
public void verifyIsUtilityClass() {
assertThat(Utils.isUtilityClass(RDFS.class),equalTo(true));
}
代码示例来源:origin: ldp4j/ldp4j
@Test
public void isUtilityClass() throws Exception {
assertThat(Utils.isUtilityClass(MoreCollections.class),equalTo(true));
}
代码示例来源:origin: ldp4j/ldp4j
@Test
public void verifyIsUtilityClass() {
assertThat(Utils.isUtilityClass(Snapshots.class),equalTo(true));
}
代码示例来源:origin: ldp4j/ldp4j
@Test
public void isUtilityClass() throws Exception {
assertThat(Utils.isUtilityClass(Languages.class),equalTo(true));
}
内容来源于网络,如有侵权,请联系作者删除!