| Modifier and Type | Field and Description |
|---|---|
| public static final int | |
| private final SegmentConstantPoolArrayCache | |
| private final CpBands | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| protected static final String | |
| protected static final String | |
| protected static final String | |
| public static final int | |
| public static final int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public ConstantPoolEntry | Returns: CPClass for that class name, or null if not found.Class name to look for (form: java/lang/Object) name)Given the name of a class, answer the CPClass associated with that class. |
| public ConstantPoolEntry | Returns: ConstantPoolEntrytype of constant pool array to search cp, final long index of the constant pool desiredIndex, final String class to use to generate a subset of the pool desiredClassName)Subset the constant pool of the specified type to be just that which has the specified class name. |
| public ConstantPoolEntry | |
| public ConstantPoolEntry | Returns: CPMethod init methodconstant pool to search (must be CP_METHOD) cp, final long index of init method value, final String String class name of the init method desiredClassName)Answer the init method for the specified class. |
| public ClassFileEntry | |
| protected int | Returns: int index into nameArray, or -1 if not found.Array of Strings against which the compareString is tested nameArray, final String String for which to search compareString, final int nth element with that match (counting from 0) desiredIndex)A number of things make use of subsets of structures. |
| protected int | Returns: int index that represents the position of the nth hit in primaryArray and secondaryArrayThe first array to search primaryArray, final String[] The second array (must be same .length as primaryArray) secondaryArray, final String The String to compare against primaryArray using .equals() primaryCompareString, final String The String to compare against secondaryArray using .matches() secondaryCompareRegex, final int The nth hit whose position we're seeking desiredIndex)This method's function is to look through pairs of arrays. |
| protected static boolean | Returns: boolean true if the compareString matches the regexString; otherwise false.String against which the compareString will be matched regexString, final String String to match against the regexString compareString)We don't want a dependency on regex in Pack200. |
| ALL | back to summary |
|---|---|
| public static final int ALL | |
| arrayCache | back to summary |
|---|---|
| private final SegmentConstantPoolArrayCache arrayCache | |
| bands | back to summary |
|---|---|
| private final CpBands bands | |
| CP_CLASS | back to summary |
|---|---|
| public static final int CP_CLASS | |
| CP_DESCR | back to summary |
|---|---|
| public static final int CP_DESCR | |
| CP_DOUBLE | back to summary |
|---|---|
| public static final int CP_DOUBLE | |
| CP_FIELD | back to summary |
|---|---|
| public static final int CP_FIELD | |
| CP_FLOAT | back to summary |
|---|---|
| public static final int CP_FLOAT | |
| CP_IMETHOD | back to summary |
|---|---|
| public static final int CP_IMETHOD | |
| CP_INT | back to summary |
|---|---|
| public static final int CP_INT | |
| CP_LONG | back to summary |
|---|---|
| public static final int CP_LONG | |
| CP_METHOD | back to summary |
|---|---|
| public static final int CP_METHOD | |
| CP_STRING | back to summary |
|---|---|
| public static final int CP_STRING | |
| INITSTRING | back to summary |
|---|---|
| protected static final String INITSTRING | |
| REGEX_MATCH_ALL | back to summary |
|---|---|
| protected static final String REGEX_MATCH_ALL | |
| REGEX_MATCH_INIT | back to summary |
|---|---|
| protected static final String REGEX_MATCH_INIT | |
| SIGNATURE | back to summary |
|---|---|
| public static final int SIGNATURE | |
| UTF_8 | back to summary |
|---|---|
| public static final int UTF_8 | |
| SegmentConstantPool | back to summary |
|---|---|
public SegmentConstantPool(final CpBands bands)
| |
| getClassPoolEntry | back to summary |
|---|---|
| public ConstantPoolEntry getClassPoolEntry(final String name) Given the name of a class, answer the CPClass associated with that class. Answer null if the class doesn't exist.
| |
| getClassSpecificPoolEntry | back to summary |
|---|---|
| public ConstantPoolEntry getClassSpecificPoolEntry(final int cp, final long desiredIndex, final String desiredClassName) throws Pack200Exception Subset the constant pool of the specified type to be just that which has the specified class name. Answer the ConstantPoolEntry at the desiredIndex of the subsetted pool.
| |
| getConstantPoolEntry | back to summary |
|---|---|
| public ConstantPoolEntry getConstantPoolEntry(final int cp, final long value) throws Pack200Exception | |
| getInitMethodPoolEntry | back to summary |
|---|---|
| public ConstantPoolEntry getInitMethodPoolEntry(final int cp, final long value, final String desiredClassName) throws Pack200Exception Answer the init method for the specified class.
| |
| getValue | back to summary |
|---|---|
| public ClassFileEntry getValue(final int cp, final long value) throws Pack200Exception | |
| matchSpecificPoolEntryIndex | back to summary |
|---|---|
| protected int matchSpecificPoolEntryIndex(final String[] nameArray, final String compareString, final int desiredIndex) A number of things make use of subsets of structures. In one particular example, _super bytecodes will use a subset of method or field classes which have
just those methods / fields defined in the superclass. Similarly, _this bytecodes use just those methods/fields defined in this class, and _init
bytecodes use just those methods that start with | |
| matchSpecificPoolEntryIndex | back to summary |
|---|---|
| protected int matchSpecificPoolEntryIndex(final String[] primaryArray, final String[] secondaryArray, final String primaryCompareString, final String secondaryCompareRegex, final int desiredIndex) This method's function is to look through pairs of arrays. It keeps track of the number of hits it finds using the following basis of comparison for a hit: - the primaryArray[index] must be .equals() to the primaryCompareString - the secondaryArray[index] .matches() the secondaryCompareString. When the desiredIndex number of hits has been reached, the index into the original two arrays of the element hit is returned.
| |
| regexMatches | back to summary |
|---|---|
| protected static boolean regexMatches(final String regexString, final String compareString) We don't want a dependency on regex in Pack200. The only place one exists is in matchSpecificPoolEntryIndex(). To eliminate this dependency, we've
implemented the world's stupidest regexMatch. It knows about the two forms we care about: .* (aka REGEX_MATCH_ALL) | |