public final class CodeInfoDecoder extends Object
u1 entryFlags u1 deltaIP [s1|s2|s4 frameSizeEncoding] [s1|s2|s4 exceptionOffset] [u2|u4 referenceMapIndex] [s4 deoptFrameInfoIndex]The first byte, entryFlags, encodes which of the optional data fields are present and what size they have. The size of the whole entry can be computed from just this byte, which allows fast iteration of the table. The deltaIP is the difference of the IP for this entry and the next entry. The first entry always corresponds to IP zero. This table structure allows linear search for the entry of a given IP. An index is used to turn this into a constant time lookup. The index stores the entry offset for every IP at the given granularity.
| Modifier and Type | Class and Description |
|---|---|
static class |
CodeInfoDecoder.MethodDescriptor |
static class |
CodeInfoDecoder.Options |
| Modifier and Type | Method and Description |
|---|---|
static Executable[] |
getAllMethodMetadata() |
static Target_jdk_internal_reflect_ConstantPool |
getMetadataPseudoConstantPool() |
static org.graalvm.collections.Pair<Executable[],CodeInfoDecoder.MethodDescriptor[]> |
getMethodMetadata(DynamicHub declaringType) |
static org.graalvm.collections.Pair<Executable[],CodeInfoDecoder.MethodDescriptor[]> |
getMethodMetadata(int typeID,
boolean complete)
The metadata for methods in the image is split into two arrays: one for the index and the
other for data.
|
public static org.graalvm.collections.Pair<Executable[],CodeInfoDecoder.MethodDescriptor[]> getMethodMetadata(DynamicHub declaringType)
public static Executable[] getAllMethodMetadata()
public static org.graalvm.collections.Pair<Executable[],CodeInfoDecoder.MethodDescriptor[]> getMethodMetadata(int typeID, boolean complete)
{
int methodNameIndex; // index in frameInfoSourceMethodNames ("" for constructors)
int modifiers;
int paramCount;
{
int paramTypeIndex; // index in frameInfoSourceClasses
} paramTypes[paramCount];
int returnTypeIndex; // index in frameInfoSourceClasses (void for constructors)
int exceptionTypeCount;
{
int exceptionTypeIndex; // index in frameInfoSourceClasses
} exceptionTypes[exceptionTypeCount];
// Annotation encodings (see CodeInfoEncoder)
int annotationsLength;
byte[] annotationsEncoding[annotationsLength];
int parameterAnnotationsLength;
byte[] parameterAnnotationsEncoding[parameterAnnotationsLength];
}
This method returns two arrays. The first one contains the desired method data, the second
one contains the names and parameter types of methods shadowing methods declared in
superclasses which therefore should not be returned by a call to getMethod(). This second
array is only computed for reflection queries, not for method dumping.public static Target_jdk_internal_reflect_ConstantPool getMetadataPseudoConstantPool()