< prev index next >
src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassReader.java
Print this page
*** 497,508 ****
String moduleMainClass = null;
// - The string corresponding to the NestHost attribute, or null.
String nestHostClass = null;
// - The offset of the NestMembers attribute, or 0.
int nestMembersOffset = 0;
! // - The offset of the PermittedSubtypes attribute, or 0
! int permittedSubtypesOffset = 0;
// - The offset of the Record attribute, or 0.
int recordOffset = 0;
// - The non standard attributes (linked with their {@link Attribute#nextAttribute} field).
// This list in the <i>reverse order</i> or their order in the ClassFile structure.
Attribute attributes = null;
--- 497,508 ----
String moduleMainClass = null;
// - The string corresponding to the NestHost attribute, or null.
String nestHostClass = null;
// - The offset of the NestMembers attribute, or 0.
int nestMembersOffset = 0;
! // - The offset of the PermittedSubclasses attribute, or 0
! int permittedSubclassesOffset = 0;
// - The offset of the Record attribute, or 0.
int recordOffset = 0;
// - The non standard attributes (linked with their {@link Attribute#nextAttribute} field).
// This list in the <i>reverse order</i> or their order in the ClassFile structure.
Attribute attributes = null;
*** 523,534 ****
enclosingMethodOffset = currentAttributeOffset;
} else if (Constants.NEST_HOST.equals(attributeName)) {
nestHostClass = readClass(currentAttributeOffset, charBuffer);
} else if (Constants.NEST_MEMBERS.equals(attributeName)) {
nestMembersOffset = currentAttributeOffset;
! } else if (Constants.PERMITTED_SUBTYPES.equals(attributeName)) {
! permittedSubtypesOffset = currentAttributeOffset;
} else if (Constants.SIGNATURE.equals(attributeName)) {
signature = readUTF8(currentAttributeOffset, charBuffer);
} else if (Constants.RUNTIME_VISIBLE_ANNOTATIONS.equals(attributeName)) {
runtimeVisibleAnnotationsOffset = currentAttributeOffset;
} else if (Constants.RUNTIME_VISIBLE_TYPE_ANNOTATIONS.equals(attributeName)) {
--- 523,534 ----
enclosingMethodOffset = currentAttributeOffset;
} else if (Constants.NEST_HOST.equals(attributeName)) {
nestHostClass = readClass(currentAttributeOffset, charBuffer);
} else if (Constants.NEST_MEMBERS.equals(attributeName)) {
nestMembersOffset = currentAttributeOffset;
! } else if (Constants.PERMITTED_SUBCLASSES.equals(attributeName)) {
! permittedSubclassesOffset = currentAttributeOffset;
} else if (Constants.SIGNATURE.equals(attributeName)) {
signature = readUTF8(currentAttributeOffset, charBuffer);
} else if (Constants.RUNTIME_VISIBLE_ANNOTATIONS.equals(attributeName)) {
runtimeVisibleAnnotationsOffset = currentAttributeOffset;
} else if (Constants.RUNTIME_VISIBLE_TYPE_ANNOTATIONS.equals(attributeName)) {
*** 702,719 ****
classVisitor.visitNestMember(readClass(currentNestMemberOffset, charBuffer));
currentNestMemberOffset += 2;
}
}
! // Visit the PermittedSubtypes attribute.
! if (permittedSubtypesOffset != 0) {
! int numberOfPermittedSubtypes = readUnsignedShort(permittedSubtypesOffset);
! int currentPermittedSubtypeOffset = permittedSubtypesOffset + 2;
! while (numberOfPermittedSubtypes-- > 0) {
! classVisitor.visitPermittedSubtypeExperimental(
! readClass(currentPermittedSubtypeOffset, charBuffer));
! currentPermittedSubtypeOffset += 2;
}
}
// Visit the InnerClasses attribute.
if (innerClassesOffset != 0) {
--- 702,719 ----
classVisitor.visitNestMember(readClass(currentNestMemberOffset, charBuffer));
currentNestMemberOffset += 2;
}
}
! // Visit the PermittedSubclasses attribute.
! if (permittedSubclassesOffset != 0) {
! int numberOfPermittedSubclasses = readUnsignedShort(permittedSubclassesOffset);
! int currentPermittedSubclassOffset = permittedSubclassesOffset + 2;
! while (numberOfPermittedSubclasses-- > 0) {
! classVisitor.visitPermittedSubclassExperimental(
! readClass(currentPermittedSubclassOffset, charBuffer));
! currentPermittedSubclassOffset += 2;
}
}
// Visit the InnerClasses attribute.
if (innerClassesOffset != 0) {
< prev index next >