Class Segment
java.lang.Object
org.objectweb.asm.ClassVisitor
org.apache.commons.compress.harmony.pack200.Segment
A Pack200 archive consists of one or more Segments.
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
static class
Exception indicating that the class currently being visited contains an unknown attribute, which means that by default the class file needs to be passed through as-is in the file_bands rather than being packed with pack200.class
SegmentAnnotationVisitor implementsAnnotationVisitor
to visit Annotations found in a class file.class
SegmentFieldVisitor implementsFieldVisitor
to visit the metadata relating to fields in a class file.class
This class implements MethodVisitor to visit the contents and metadata related to methods in a class file. -
Field Summary
Modifier and TypeFieldDescriptionstatic int
See https://asm.ow2.io/Javadoc/org/objectweb/asm/Opcodes.html#ASM4Fields inherited from class org.objectweb.asm.ClassVisitor
api, cv
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
void
pack
(org.apache.commons.compress.harmony.pack200.Archive.SegmentUnit segmentUnit, OutputStream out, PackingOptions options) The main method on Segment.void
visit
(int version, int access, String name, String signature, String superName, String[] interfaces) org.objectweb.asm.AnnotationVisitor
visitAnnotation
(String desc, boolean visible) void
visitAttribute
(org.objectweb.asm.Attribute attribute) void
visitEnd()
org.objectweb.asm.FieldVisitor
visitField
(int flags, String name, String desc, String signature, Object value) void
visitInnerClass
(String name, String outerName, String innerName, int flags) org.objectweb.asm.MethodVisitor
visitMethod
(int flags, String name, String desc, String signature, String[] exceptions) void
visitOuterClass
(String owner, String name, String desc) void
visitSource
(String source, String debug) Methods inherited from class org.objectweb.asm.ClassVisitor
getDelegate, visitModule, visitNestHost, visitNestMember, visitPermittedSubclass, visitRecordComponent, visitTypeAnnotation
-
Field Details
-
ASM_API
See https://asm.ow2.io/Javadoc/org/objectweb/asm/Opcodes.html#ASM4
-
-
Constructor Details
-
Segment
public Segment()
-
-
Method Details
-
getAttrBands
-
getClassBands
-
getCpBands
-
getCurrentClassReader
-
getIcBands
-
getSegmentHeader
-
lastConstantHadWideIndex
-
pack
public void pack(org.apache.commons.compress.harmony.pack200.Archive.SegmentUnit segmentUnit, OutputStream out, PackingOptions options) throws IOException, Pack200Exception The main method on Segment. Reads in all the class files, packs them and then writes the packed segment out to the given OutputStream.- Parameters:
segmentUnit
- TODOout
- the OutputStream to write the packed Segment tooptions
- packing options- Throws:
IOException
- If an I/O error occurs.Pack200Exception
- TODO
-
visit
public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) - Overrides:
visit
in classorg.objectweb.asm.ClassVisitor
-
visitAnnotation
- Overrides:
visitAnnotation
in classorg.objectweb.asm.ClassVisitor
-
visitAttribute
- Overrides:
visitAttribute
in classorg.objectweb.asm.ClassVisitor
-
visitEnd
- Overrides:
visitEnd
in classorg.objectweb.asm.ClassVisitor
-
visitField
public org.objectweb.asm.FieldVisitor visitField(int flags, String name, String desc, String signature, Object value) - Overrides:
visitField
in classorg.objectweb.asm.ClassVisitor
-
visitInnerClass
- Overrides:
visitInnerClass
in classorg.objectweb.asm.ClassVisitor
-
visitMethod
public org.objectweb.asm.MethodVisitor visitMethod(int flags, String name, String desc, String signature, String[] exceptions) - Overrides:
visitMethod
in classorg.objectweb.asm.ClassVisitor
-
visitOuterClass
- Overrides:
visitOuterClass
in classorg.objectweb.asm.ClassVisitor
-
visitSource
- Overrides:
visitSource
in classorg.objectweb.asm.ClassVisitor
-