org.ldp4j.commons.testing.Utils.isUtilityClass()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(3.5k)|赞(0)|评价(0)|浏览(75)

本文整理了Java中org.ldp4j.commons.testing.Utils.isUtilityClass()方法的一些代码示例,展示了Utils.isUtilityClass()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.isUtilityClass()方法的具体详情如下:
包路径:org.ldp4j.commons.testing.Utils
类名称:Utils
方法名:isUtilityClass

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));
}

相关文章