Class CpBands
java.lang.Object
org.apache.commons.compress.harmony.pack200.BandSet
org.apache.commons.compress.harmony.pack200.CpBands
Pack200 Constant Pool Bands
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.commons.compress.harmony.pack200.BandSet
BandSet.BandAnalysisResults, BandSet.BandData -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Set<CPNameAndType>private final Set<CPMethodOrField>private final Set<CPMethodOrField>private final Set<CPMethodOrField>private final Set<CPSignature>private final Map<Object,CPConstant<?>> private final Segmentprivate final Map<String,CPMethodOrField> private final Map<String,CPMethodOrField> private final Map<String,CPMethodOrField> private final Map<String,CPNameAndType> private final Map<String,CPSignature> Fields inherited from class org.apache.commons.compress.harmony.pack200.BandSet
effort, segmentHeader -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddCharacters(List<Character> chars, char[] charArray) voidaddCPClass(String className) (package private) voidprivate voidbooleanexistsCpClass(String className) 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.CPConstant<?>getConstant(Object value) getCPClass(String className) Gets a constant pool class for the given class name.getCPField(String owner, String name, String desc) getCPField(CPClass cpClass, String name, String desc) getCPIMethod(String owner, String name, String desc) getCPIMethod(CPClass cpClass, String name, String desc) getCPMethod(String owner, String name, String desc) getCPMethod(CPClass cpClass, String name, String desc) getCPNameAndType(String name, String signature) getCPSignature(String signature) Gets a constant pool signature.voidpack(OutputStream out) Writes the packed set of bands to the given output stream.private voidremoveCpUtf8(String string) private voidprivate voidwriteCpClass(OutputStream out) private voidwriteCpDescr(OutputStream out) private voidprivate voidwriteCpFloat(OutputStream out) private voidwriteCpInt(OutputStream out) private voidwriteCpLong(OutputStream out) private voidwriteCpMethodOrField(Set<CPMethodOrField> cp, OutputStream out, String name) private voidprivate voidprivate voidwriteCpUtf8(OutputStream out) Methods inherited from class org.apache.commons.compress.harmony.pack200.BandSet
cpEntryListToArray, cpEntryOrNullListToArray, encodeBandInt, encodeFlags, encodeFlags, encodeScalar, encodeScalar, integerListToArray, longListToArray
-
Field Details
-
defaultAttributeNames
-
cp_Utf8
-
cp_Int
-
cp_Float
-
cp_Long
-
cp_Double
-
cp_String
-
cp_Class
-
cp_Signature
-
cp_Descr
-
cp_Field
-
cp_Method
-
cp_Imethod
-
stringsToCpUtf8
-
stringsToCpNameAndType
-
stringsToCpClass
-
stringsToCpSignature
-
stringsToCpMethod
-
stringsToCpField
-
stringsToCpIMethod
-
objectsToCPConstant
-
segment
-
-
Constructor Details
-
CpBands
-
-
Method Details
-
addCharacters
-
addCPClass
-
addCPUtf8
-
addIndices
private void addIndices() -
existsCpClass
-
finaliseBands
public void 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. -
getConstant
-
getCPClass
Gets a constant pool class for the given class name.- Parameters:
className- a fully-qualifed class name.- Returns:
- a a constant pool class.
-
getCPField
-
getCPField
-
getCPIMethod
-
getCPIMethod
-
getCPMethod
-
getCPMethod
-
getCPNameAndType
-
getCPSignature
Gets a constant pool signature.- Parameters:
signature- the signature string.- Returns:
- a constant pool signature.
-
getCPUtf8
-
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.
-
removeCpUtf8
-
removeSignaturesFromCpUTF8
private void removeSignaturesFromCpUTF8() -
writeCpClass
- Throws:
IOExceptionPack200Exception
-
writeCpDescr
- Throws:
IOExceptionPack200Exception
-
writeCpDouble
- Throws:
IOExceptionPack200Exception
-
writeCpFloat
- Throws:
IOExceptionPack200Exception
-
writeCpInt
- Throws:
IOExceptionPack200Exception
-
writeCpLong
- Throws:
IOExceptionPack200Exception
-
writeCpMethodOrField
private void writeCpMethodOrField(Set<CPMethodOrField> cp, OutputStream out, String name) throws IOException, Pack200Exception - Throws:
IOExceptionPack200Exception
-
writeCpSignature
- Throws:
IOExceptionPack200Exception
-
writeCpString
- Throws:
IOExceptionPack200Exception
-
writeCpUtf8
- Throws:
IOExceptionPack200Exception
-