public Object getValue(long value, Segment segment) throws Pack200Exception {
if (layout.startsWith("R")) {
// references
if (layout.indexOf('N') != -1)
value--;
SegmentConstantPool pool = segment.getConstantPool();
if (layout.startsWith("RU")) {
return pool.getValue(SegmentConstantPool.UTF_8, value);
} else if (layout.startsWith("RS")) {
return pool.getValue(SegmentConstantPool.SIGNATURE, value);
}
}
throw new Pack200Exception("Unknown layout encoding: " + layout);
}