< prev index next > test/jdk/java/lang/Class/GenericStringTest.java
Print this page
/*
* @test
* @bug 6298888 6992705 8161500 6304578 8322878
* @summary Check Class.toGenericString()
+ * @enablePreview
+ * @compile GenericStringTest.java
+ * @run main/othervm GenericStringTest
*/
import java.lang.reflect.*;
import java.lang.annotation.*;
import java.util.*;
for(Class<?> clazz : List.of(GenericStringTest.class,
AnInterface.class,
LocalMap.class,
AnEnum.class,
AnotherEnum.class,
+ AValueClass.class,
SealedRootClass.class,
SealedRootClass.ChildA.class,
SealedRootClass.ChildB.class,
SealedRootClass.ChildB.GrandChildAB.class,
@ExpectedGenericString("sealed enum AnotherEnum")
enum AnotherEnum {
BAR{};
}
+ @ExpectedGenericString("final value class AValueClass<E>")
+ value class AValueClass<E> {}
+
// Test cases for sealed/non-sealed _class_ hierarchy.
@ExpectedGenericString("sealed class SealedRootClass")
sealed class SealedRootClass
permits
SealedRootClass.ChildA,
< prev index next >