Class ClassBands
java.lang.Object
org.apache.commons.compress.harmony.pack200.BandSet
org.apache.commons.compress.harmony.pack200.ClassBands
Class bands (corresponds to the
class_bands set of bands in the pack200 specification)-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.commons.compress.harmony.pack200.BandSet
BandSet.BandAnalysisResults, BandSet.BandData -
Field Summary
Fields inherited from class org.apache.commons.compress.harmony.pack200.BandSet
segmentHeader -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAnnotation(int context, String desc, boolean visible, List<String> nameRU, List<String> tags, List<Object> values, List<Integer> caseArrayN, List<String> nestTypeRS, List<String> nestNameRU, List<Integer> nestPairN) voidaddAnnotationDefault(List<String> nameRU, List<String> tags, List<Object> values, List<Integer> caseArrayN, List<String> nestTypeRS, List<String> nestNameRU, List<Integer> nestPairN) voidaddClass(int major, int flags, String className, String signature, String superName, String[] interfaces) voidaddClassAttribute(NewAttribute attribute) Adds a new class attribute.voidaddCode()voidaddCodeAttribute(NewAttribute attribute) Adds a new code attribute.voidaddEnclosingMethod(String ownerClassName, String name, String signature) Adds an enclosing method.voidvoidaddFieldAttribute(NewAttribute attribute) Adds a new field attribute.voidaddHandler(org.objectweb.asm.Label start, org.objectweb.asm.Label end, org.objectweb.asm.Label handler, String type) voidaddLineNumber(int line, org.objectweb.asm.Label start) voidaddLocalVariable(String name, String desc, String signature, org.objectweb.asm.Label start, org.objectweb.asm.Label end, int indx) voidaddMaxStack(int maxStack, int maxLocals) voidvoidaddMethodAttribute(NewAttribute attribute) Adds a new method attribute.voidaddParameterAnnotation(int parameter, String desc, boolean visible, List<String> nameRU, List<String> tags, List<Object> values, List<Integer> caseArrayN, List<String> nestTypeRS, List<String> nestNameRU, List<Integer> nestPairN) voidaddSourceFile(String source) Adds a source file path.protected static intCounts arguments in a descriptor.voidvoiddoBciRenumbering(IntList bciRenumbering, Map<org.objectweb.asm.Label, Integer> labelsToOffsets) voidCalled when all the data for the current class has been.voidCalled when all the data for the current method has been.voidAll input classes for the segment have now been read in, so this method is called so that this class can calculate/complete anything it could not do while classes were being read.booleanTests whether there are any synthetic classes.booleanTests whether there are any synthetic fields.booleanTests whether there are any synthetic methods.intGets the number of classes processed.voidpack(OutputStream out) Writes the packed set of bands to the given output stream.voidRemove all entries for the current classMethods inherited from class org.apache.commons.compress.harmony.pack200.BandSet
cpEntryListToArray, cpEntryOrNullListToArray, encodeBandInt, encodeFlags, encodeFlags, encodeScalar, encodeScalar, integerListToArray, longListToArray
-
Constructor Details
-
ClassBands
public ClassBands(Segment segment, int numClasses, int effort, boolean stripDebug) throws IOException - Throws:
IOException
-
-
Method Details
-
countArgs
Counts arguments in a descriptor.- Parameters:
descriptor- the descriptor to parse.- Returns:
- the argument count.
-
addAnnotation
-
addAnnotationDefault
-
addClass
-
addClassAttribute
Adds a new class attribute.- Parameters:
attribute- the new class attribute.
-
addCode
-
addCodeAttribute
Adds a new code attribute.- Parameters:
attribute- the new code attribute.
-
addEnclosingMethod
Adds an enclosing method.- Parameters:
ownerClassName- a fully-qualifed class name.name- a method name.signature- a signature in the constant pool.
-
addField
-
addFieldAttribute
Adds a new field attribute.- Parameters:
attribute- the new field attribute.
-
addHandler
public void addHandler(org.objectweb.asm.Label start, org.objectweb.asm.Label end, org.objectweb.asm.Label handler, String type) -
addLineNumber
-
addLocalVariable
public void addLocalVariable(String name, String desc, String signature, org.objectweb.asm.Label start, org.objectweb.asm.Label end, int indx) -
addMaxStack
-
addMethod
-
addMethodAttribute
Adds a new method attribute.- Parameters:
attribute- the new method attribute.
-
addParameterAnnotation
-
addSourceFile
Adds a source file path.- Parameters:
source- a source file path.
-
currentClassReferencesInnerClass
-
doBciRenumbering
public void doBciRenumbering(IntList bciRenumbering, Map<org.objectweb.asm.Label, Integer> labelsToOffsets) -
endOfClass
Called when all the data for the current class has been.- See Also:
-
endOfMethod
Called when all the data for the current method has been.- See Also:
-
finaliseBands
All input classes for the segment have now been read in, so this method is called so that this class can calculate/complete anything it could not do while classes were being read. -
isAnySyntheticClasses
Tests whether there are any synthetic classes.- Returns:
- whether there are any synthetic classes.
-
isAnySyntheticFields
Tests whether there are any synthetic fields.- Returns:
- whether there are any synthetic fields.
-
isAnySyntheticMethods
Tests whether there are any synthetic methods.- Returns:
- whether there are any synthetic methods.
-
numClassesProcessed
Gets the number of classes processed.- Returns:
- the number of classes processed.
-
pack
Description copied from class:BandSetWrites the packed set of bands to the given output stream.- Specified by:
packin classBandSet- Parameters:
out- TODO- Throws:
IOException- If an I/O error occurs.Pack200Exception- If a Pack200 semantic error occurs.
-
removeCurrentClass
Remove all entries for the current class
-