Пример #1
0
 @Test
 public void enclosingClassName() throws Exception {
   assertThat(Convert.enclosingClassName("MyClass")).isEqualTo("");
   assertThat(Convert.enclosingClassName("MyClass$InnerClass")).isEqualTo("MyClass");
   assertThat(Convert.enclosingClassName("MyClass$$InnerClass$class")).isEqualTo("MyClass$");
   assertThat(Convert.enclosingClassName("MyClass$$InnerClass$")).isEqualTo("MyClass$");
 }
Пример #2
0
 private JavaSymbol.TypeJavaSymbol getClassSymbol(String bytecodeName, int flags) {
   return bytecodeCompleter.getClassSymbol(Convert.flatName(bytecodeName), flags);
 }
Пример #3
0
 @Test
 public void fullName() throws Exception {
   assertThat(Convert.fullName(null, "MyClass")).isEqualTo("MyClass");
   assertThat(Convert.fullName("", "MyClass")).isEqualTo("MyClass");
   assertThat(Convert.fullName("org.example", "MyClass")).isEqualTo("org.example.MyClass");
 }
Пример #4
0
 @Test
 public void bytecodeName() {
   assertThat(Convert.bytecodeName("org.example.MyClass")).isEqualTo("org/example/MyClass");
   assertThat(Convert.bytecodeName("org.example.MyClass$InnerClass"))
       .isEqualTo("org/example/MyClass$InnerClass");
 }
Пример #5
0
 @Test
 public void shortName() {
   assertThat(Convert.shortName("org")).isEqualTo("org");
   assertThat(Convert.shortName("org.example")).isEqualTo("example");
 }
Пример #6
0
 @Test
 public void packagePart() {
   assertThat(Convert.packagePart("org")).isEqualTo("");
   assertThat(Convert.packagePart("org.example")).isEqualTo("org");
 }