public class HotSpotSignature extends Object implements Signature
| Modifier and Type | Field and Description |
|---|---|
private String |
originalString |
private List<String> |
parameters |
private ResolvedJavaType[] |
parameterTypes |
private String |
returnType |
private ResolvedJavaType |
returnTypeCache |
private HotSpotJVMCIRuntimeProvider |
runtime |
| Constructor and Description |
|---|
HotSpotSignature(HotSpotJVMCIRuntimeProvider runtime,
ResolvedJavaType returnType,
ResolvedJavaType... parameterTypes) |
HotSpotSignature(HotSpotJVMCIRuntimeProvider runtime,
String signature) |
| Modifier and Type | Method and Description |
|---|---|
private static boolean |
checkValidCache(ResolvedJavaType type,
ResolvedJavaType accessingClass) |
boolean |
equals(Object obj) |
int |
getParameterCount(boolean withReceiver)
Returns the number of parameters in this signature, adding 1 for a receiver if requested.
|
Kind |
getParameterKind(int index)
Gets the parameter kind at the specified position.
|
JavaType |
getParameterType(int index,
ResolvedJavaType accessingClass)
Gets the parameter type at the specified position.
|
Kind |
getReturnKind()
Gets the return kind of this signature.
|
JavaType |
getReturnType(ResolvedJavaType accessingClass)
Gets the return type of this signature.
|
private static JavaType |
getUnresolvedOrPrimitiveType(HotSpotJVMCIRuntimeProvider runtime,
String name) |
int |
hashCode() |
private static int |
parseSignature(String signature,
int start) |
String |
toMethodDescriptor()
Gets the method
descriptor corresponding to this signature.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waittoParameterKinds, toParameterTypesprivate final List<String> parameters
private final String returnType
private final String originalString
private ResolvedJavaType[] parameterTypes
private ResolvedJavaType returnTypeCache
private final HotSpotJVMCIRuntimeProvider runtime
public HotSpotSignature(HotSpotJVMCIRuntimeProvider runtime, String signature)
public HotSpotSignature(HotSpotJVMCIRuntimeProvider runtime, ResolvedJavaType returnType, ResolvedJavaType... parameterTypes)
private static int parseSignature(String signature, int start)
public int getParameterCount(boolean withReceiver)
SignaturegetParameterCount in interface SignaturewithReceiver - true if 1 is to be added to the result for a receiverreceiver == truepublic Kind getParameterKind(int index)
SignatureSignature.getParameterType(int, jdk.internal.jvmci.meta.ResolvedJavaType). getKind.getParameterKind in interface Signatureindex - the index into the parameters, with 0 indicating the first parameterprivate static boolean checkValidCache(ResolvedJavaType type, ResolvedJavaType accessingClass)
private static JavaType getUnresolvedOrPrimitiveType(HotSpotJVMCIRuntimeProvider runtime, String name)
public JavaType getParameterType(int index, ResolvedJavaType accessingClass)
SignaturegetParameterType in interface Signatureindex - the index into the parameters, with 0 indicating the first parameteraccessingClass - the context of the type lookup. If non-null, its class loader is used
for resolving the type. If null, then the type returned is either
unresolved or a resolved type whose resolution is context free (e.g., a primitive
type or a type in a java.* package).index'th parameter typepublic String toMethodDescriptor()
Signature(ILjava/lang/String;D)V
toMethodDescriptor in interface Signaturepublic Kind getReturnKind()
SignatureSignature.getReturnType(jdk.internal.jvmci.meta.ResolvedJavaType).
getKind.getReturnKind in interface Signaturepublic JavaType getReturnType(ResolvedJavaType accessingClass)
SignaturegetReturnType in interface SignatureaccessingClass - the context of the type lookup. If non-null, its class loader is used
for resolving the type. If null, then the type returned is either
unresolved or a resolved type whose resolution is context free (e.g., a primitive
type or a type in a java.* package).