public class HeaderMap extends Object
This class provides support for reading and generating clang header maps. No spec is available but we conform to the reader class defined in the Clang documentation.
Note: currently we don't support offsets greater than MAX_SIGNED_INT.
Modifier and Type | Class and Description |
---|---|
static class |
HeaderMap.Builder
Build a header map from individual mappings.
|
static interface |
HeaderMap.HeaderMapVisitor
Visitor function for
visit(HeaderMapVisitor) . |
Modifier and Type | Method and Description |
---|---|
static HeaderMap.Builder |
builder() |
static HeaderMap |
deserialize(byte[] bytes) |
static HeaderMap |
deserialize(ByteBuffer buffer) |
byte[] |
getBytes() |
byte[] |
getBytes(ByteOrder bo) |
int |
getMaxValueLength() |
int |
getNumBuckets() |
int |
getNumEntries() |
int |
getRequiredBufferCapacity() |
static HeaderMap |
loadFromFile(File hmapFile) |
String |
lookup(String str) |
void |
print(Appendable stream) |
void |
serialize(ByteBuffer buffer) |
String |
toString() |
void |
visit(HeaderMap.HeaderMapVisitor visitor) |
public int getNumEntries()
public int getNumBuckets()
public int getMaxValueLength()
public void visit(HeaderMap.HeaderMapVisitor visitor)
public void print(Appendable stream)
@Nullable public static HeaderMap deserialize(ByteBuffer buffer)
public static HeaderMap loadFromFile(File hmapFile) throws IOException
IOException
public int getRequiredBufferCapacity()
public byte[] getBytes()
public byte[] getBytes(ByteOrder bo)
public void serialize(ByteBuffer buffer)
public static HeaderMap.Builder builder()