< prev index next > test/jdk/java/lang/Class/getSimpleName/GetSimpleNameTest.java
Print this page
byte[] getNestedClasses(boolean isInner) {
var name = (isInner ? innerName : outerName);
return ClassFile.of().build(name, clb -> {
clb.withSuperclass(CD_Object);
! clb.withFlags(AccessFlag.PUBLIC, AccessFlag.SUPER);
clb.with(InnerClassesAttribute.of(
InnerClassInfo.of(innerName,
Optional.of(outerName),
Optional.of(simpleName))));
makeDefaultCtor(clb);
byte[] getNestedClasses(boolean isInner) {
var name = (isInner ? innerName : outerName);
return ClassFile.of().build(name, clb -> {
clb.withSuperclass(CD_Object);
! clb.withFlags(AccessFlag.PUBLIC, AccessFlag.IDENTITY);
clb.with(InnerClassesAttribute.of(
InnerClassInfo.of(innerName,
Optional.of(outerName),
Optional.of(simpleName))));
makeDefaultCtor(clb);
byte[] getInnerClasses(boolean isInner) {
var name = (isInner ? innerName : outerName);
return ClassFile.of().build(name, clb -> {
clb.withSuperclass(CD_Object);
! clb.withFlags(AccessFlag.PUBLIC, AccessFlag.SUPER);
clb.with(InnerClassesAttribute.of(
InnerClassInfo.of(innerName,
Optional.of(outerName),
Optional.of(simpleName),
AccessFlag.PUBLIC)));
byte[] getInnerClasses(boolean isInner) {
var name = (isInner ? innerName : outerName);
return ClassFile.of().build(name, clb -> {
clb.withSuperclass(CD_Object);
! clb.withFlags(AccessFlag.PUBLIC, AccessFlag.IDENTITY);
clb.with(InnerClassesAttribute.of(
InnerClassInfo.of(innerName,
Optional.of(outerName),
Optional.of(simpleName),
AccessFlag.PUBLIC)));
byte[] getLocalClasses(boolean isInner) {
var name = (isInner ? innerName : outerName);
return ClassFile.of().build(name, clb -> {
clb.withSuperclass(CD_Object);
! clb.withFlags(AccessFlag.PUBLIC, AccessFlag.SUPER);
clb.with(InnerClassesAttribute.of(
InnerClassInfo.of(innerName,
Optional.empty(),
Optional.of(simpleName),
AccessFlag.PUBLIC, AccessFlag.STATIC)));
byte[] getLocalClasses(boolean isInner) {
var name = (isInner ? innerName : outerName);
return ClassFile.of().build(name, clb -> {
clb.withSuperclass(CD_Object);
! clb.withFlags(AccessFlag.PUBLIC, AccessFlag.IDENTITY);
clb.with(InnerClassesAttribute.of(
InnerClassInfo.of(innerName,
Optional.empty(),
Optional.of(simpleName),
AccessFlag.PUBLIC, AccessFlag.STATIC)));
byte[] getAnonymousClasses(boolean isInner) {
var name = (isInner ? innerName : outerName);
return ClassFile.of().build(name, clb -> {
clb.withSuperclass(CD_Object);
! clb.withFlags(AccessFlag.PUBLIC, AccessFlag.SUPER);
clb.with(InnerClassesAttribute.of(
InnerClassInfo.of(innerName,
Optional.empty(),
Optional.empty(),
AccessFlag.PUBLIC, AccessFlag.STATIC)));
byte[] getAnonymousClasses(boolean isInner) {
var name = (isInner ? innerName : outerName);
return ClassFile.of().build(name, clb -> {
clb.withSuperclass(CD_Object);
! clb.withFlags(AccessFlag.PUBLIC, AccessFlag.IDENTITY);
clb.with(InnerClassesAttribute.of(
InnerClassInfo.of(innerName,
Optional.empty(),
Optional.empty(),
AccessFlag.PUBLIC, AccessFlag.STATIC)));
< prev index next >