< prev index next >

src/java.base/share/classes/jdk/internal/classfile/impl/UnboundAttribute.java

Print this page

 32 import java.lang.classfile.AnnotationValue;
 33 import java.lang.classfile.Attribute;
 34 import java.lang.classfile.AttributeMapper;
 35 import java.lang.classfile.Attributes;
 36 import java.lang.classfile.BootstrapMethodEntry;
 37 import java.lang.classfile.constantpool.ClassEntry;
 38 import java.lang.classfile.TypeAnnotation;
 39 import java.lang.classfile.attribute.AnnotationDefaultAttribute;
 40 import java.lang.classfile.attribute.BootstrapMethodsAttribute;
 41 import java.lang.classfile.attribute.CharacterRangeInfo;
 42 import java.lang.classfile.attribute.CharacterRangeTableAttribute;
 43 import java.lang.classfile.attribute.CompilationIDAttribute;
 44 import java.lang.classfile.attribute.ConstantValueAttribute;
 45 import java.lang.classfile.attribute.DeprecatedAttribute;
 46 import java.lang.classfile.attribute.EnclosingMethodAttribute;
 47 import java.lang.classfile.attribute.ExceptionsAttribute;
 48 import java.lang.classfile.attribute.InnerClassInfo;
 49 import java.lang.classfile.attribute.InnerClassesAttribute;
 50 import java.lang.classfile.attribute.LineNumberInfo;
 51 import java.lang.classfile.attribute.LineNumberTableAttribute;

 52 import java.lang.classfile.attribute.LocalVariableInfo;
 53 import java.lang.classfile.attribute.LocalVariableTableAttribute;
 54 import java.lang.classfile.attribute.LocalVariableTypeInfo;
 55 import java.lang.classfile.attribute.LocalVariableTypeTableAttribute;
 56 import java.lang.classfile.attribute.MethodParameterInfo;
 57 import java.lang.classfile.attribute.MethodParametersAttribute;
 58 import java.lang.classfile.attribute.ModuleAttribute;
 59 import java.lang.classfile.attribute.ModuleExportInfo;
 60 import java.lang.classfile.attribute.ModuleHashInfo;
 61 import java.lang.classfile.attribute.ModuleHashesAttribute;
 62 import java.lang.classfile.attribute.ModuleMainClassAttribute;
 63 import java.lang.classfile.attribute.ModuleOpenInfo;
 64 import java.lang.classfile.attribute.ModulePackagesAttribute;
 65 import java.lang.classfile.attribute.ModuleProvideInfo;
 66 import java.lang.classfile.attribute.ModuleRequireInfo;
 67 import java.lang.classfile.attribute.ModuleResolutionAttribute;
 68 import java.lang.classfile.attribute.ModuleTargetAttribute;
 69 import java.lang.classfile.attribute.NestHostAttribute;
 70 import java.lang.classfile.attribute.NestMembersAttribute;
 71 import java.lang.classfile.attribute.PermittedSubclassesAttribute;

413             return resolutionFlags;
414         }
415     }
416 
417     public static final class UnboundPermittedSubclassesAttribute
418             extends UnboundAttribute<PermittedSubclassesAttribute>
419             implements PermittedSubclassesAttribute {
420         private final List<ClassEntry> permittedSubclasses;
421 
422         public UnboundPermittedSubclassesAttribute(List<ClassEntry> permittedSubclasses) {
423             super(Attributes.permittedSubclasses());
424             this.permittedSubclasses = List.copyOf(permittedSubclasses);
425         }
426 
427         @Override
428         public List<ClassEntry> permittedSubclasses() {
429             return permittedSubclasses;
430         }
431     }
432 
















433     public static final class UnboundNestMembersAttribute
434             extends UnboundAttribute<NestMembersAttribute>
435             implements NestMembersAttribute {
436         private final List<ClassEntry> memberEntries;
437 
438         public UnboundNestMembersAttribute(List<ClassEntry> memberEntries) {
439             super(Attributes.nestMembers());
440             this.memberEntries = List.copyOf(memberEntries);
441         }
442 
443         @Override
444         public List<ClassEntry> nestMembers() {
445             return memberEntries;
446         }
447     }
448 
449     public static final class UnboundNestHostAttribute
450             extends UnboundAttribute<NestHostAttribute>
451             implements NestHostAttribute {
452         private final ClassEntry hostEntry;

 32 import java.lang.classfile.AnnotationValue;
 33 import java.lang.classfile.Attribute;
 34 import java.lang.classfile.AttributeMapper;
 35 import java.lang.classfile.Attributes;
 36 import java.lang.classfile.BootstrapMethodEntry;
 37 import java.lang.classfile.constantpool.ClassEntry;
 38 import java.lang.classfile.TypeAnnotation;
 39 import java.lang.classfile.attribute.AnnotationDefaultAttribute;
 40 import java.lang.classfile.attribute.BootstrapMethodsAttribute;
 41 import java.lang.classfile.attribute.CharacterRangeInfo;
 42 import java.lang.classfile.attribute.CharacterRangeTableAttribute;
 43 import java.lang.classfile.attribute.CompilationIDAttribute;
 44 import java.lang.classfile.attribute.ConstantValueAttribute;
 45 import java.lang.classfile.attribute.DeprecatedAttribute;
 46 import java.lang.classfile.attribute.EnclosingMethodAttribute;
 47 import java.lang.classfile.attribute.ExceptionsAttribute;
 48 import java.lang.classfile.attribute.InnerClassInfo;
 49 import java.lang.classfile.attribute.InnerClassesAttribute;
 50 import java.lang.classfile.attribute.LineNumberInfo;
 51 import java.lang.classfile.attribute.LineNumberTableAttribute;
 52 import java.lang.classfile.attribute.LoadableDescriptorsAttribute;
 53 import java.lang.classfile.attribute.LocalVariableInfo;
 54 import java.lang.classfile.attribute.LocalVariableTableAttribute;
 55 import java.lang.classfile.attribute.LocalVariableTypeInfo;
 56 import java.lang.classfile.attribute.LocalVariableTypeTableAttribute;
 57 import java.lang.classfile.attribute.MethodParameterInfo;
 58 import java.lang.classfile.attribute.MethodParametersAttribute;
 59 import java.lang.classfile.attribute.ModuleAttribute;
 60 import java.lang.classfile.attribute.ModuleExportInfo;
 61 import java.lang.classfile.attribute.ModuleHashInfo;
 62 import java.lang.classfile.attribute.ModuleHashesAttribute;
 63 import java.lang.classfile.attribute.ModuleMainClassAttribute;
 64 import java.lang.classfile.attribute.ModuleOpenInfo;
 65 import java.lang.classfile.attribute.ModulePackagesAttribute;
 66 import java.lang.classfile.attribute.ModuleProvideInfo;
 67 import java.lang.classfile.attribute.ModuleRequireInfo;
 68 import java.lang.classfile.attribute.ModuleResolutionAttribute;
 69 import java.lang.classfile.attribute.ModuleTargetAttribute;
 70 import java.lang.classfile.attribute.NestHostAttribute;
 71 import java.lang.classfile.attribute.NestMembersAttribute;
 72 import java.lang.classfile.attribute.PermittedSubclassesAttribute;

414             return resolutionFlags;
415         }
416     }
417 
418     public static final class UnboundPermittedSubclassesAttribute
419             extends UnboundAttribute<PermittedSubclassesAttribute>
420             implements PermittedSubclassesAttribute {
421         private final List<ClassEntry> permittedSubclasses;
422 
423         public UnboundPermittedSubclassesAttribute(List<ClassEntry> permittedSubclasses) {
424             super(Attributes.permittedSubclasses());
425             this.permittedSubclasses = List.copyOf(permittedSubclasses);
426         }
427 
428         @Override
429         public List<ClassEntry> permittedSubclasses() {
430             return permittedSubclasses;
431         }
432     }
433 
434     public static final class UnboundLoadableDescriptorsAttribute
435             extends UnboundAttribute<LoadableDescriptorsAttribute>
436             implements LoadableDescriptorsAttribute {
437         private final List<Utf8Entry> loadableDescriptors;
438 
439         public UnboundLoadableDescriptorsAttribute(List<Utf8Entry> loadableDescriptors) {
440             super(Attributes.loadableDescriptors());
441             this.loadableDescriptors = List.copyOf(loadableDescriptors);
442         }
443 
444         @Override
445         public List<Utf8Entry> loadableDescriptors() {
446             return loadableDescriptors;
447         }
448     }
449 
450     public static final class UnboundNestMembersAttribute
451             extends UnboundAttribute<NestMembersAttribute>
452             implements NestMembersAttribute {
453         private final List<ClassEntry> memberEntries;
454 
455         public UnboundNestMembersAttribute(List<ClassEntry> memberEntries) {
456             super(Attributes.nestMembers());
457             this.memberEntries = List.copyOf(memberEntries);
458         }
459 
460         @Override
461         public List<ClassEntry> nestMembers() {
462             return memberEntries;
463         }
464     }
465 
466     public static final class UnboundNestHostAttribute
467             extends UnboundAttribute<NestHostAttribute>
468             implements NestHostAttribute {
469         private final ClassEntry hostEntry;
< prev index next >