public static String getMethodProtoDescriptor(MethodProtoReference methodProtoReference) { StringWriter stringWriter = new StringWriter(); try { writeMethodProtoDescriptor(stringWriter, methodProtoReference); } catch (IOException ex) { // IOException shouldn't happen for a StringWriter... throw new RuntimeException(ex); } return stringWriter.toString(); }
public static String getMethodProtoDescriptor(MethodProtoReference methodProtoReference) { StringWriter stringWriter = new StringWriter(); try { writeMethodProtoDescriptor(stringWriter, methodProtoReference); } catch (IOException ex) { // IOException shouldn't happen for a StringWriter... throw new RuntimeException(ex); } return stringWriter.toString(); }
public static void writeCallSite(Writer writer, CallSiteReference callSiteReference) throws IOException { writer.write(callSiteReference.getName()); writer.write('('); writer.write('"'); StringUtils.writeEscapedString(writer, callSiteReference.getMethodName()); writer.write('"'); writer.write(", "); writeMethodProtoDescriptor(writer, callSiteReference.getMethodProto()); for (EncodedValue encodedValue : callSiteReference.getExtraArguments()) { writer.write(", "); EncodedValueUtils.writeEncodedValue(writer, encodedValue); } writer.write(")@"); MethodHandleReference methodHandle = callSiteReference.getMethodHandle(); if (methodHandle.getMethodHandleType() != MethodHandleType.INVOKE_STATIC) { throw new IllegalArgumentException("The linker method handle for a call site must be of type invoke-static"); } writeMethodDescriptor(writer, (MethodReference)callSiteReference.getMethodHandle().getMemberReference()); }
public static void writeCallSite(Writer writer, CallSiteReference callSiteReference) throws IOException { writer.write(callSiteReference.getName()); writer.write('('); writer.write('"'); StringUtils.writeEscapedString(writer, callSiteReference.getMethodName()); writer.write('"'); writer.write(", "); writeMethodProtoDescriptor(writer, callSiteReference.getMethodProto()); for (EncodedValue encodedValue : callSiteReference.getExtraArguments()) { writer.write(", "); EncodedValueUtils.writeEncodedValue(writer, encodedValue); } writer.write(")@"); MethodHandleReference methodHandle = callSiteReference.getMethodHandle(); if (methodHandle.getMethodHandleType() != MethodHandleType.INVOKE_STATIC) { throw new IllegalArgumentException("The linker method handle for a call site must be of type invoke-static"); } writeMethodDescriptor(writer, (MethodReference)callSiteReference.getMethodHandle().getMemberReference()); }
break; case ValueType.METHOD_TYPE: ReferenceUtil.writeMethodProtoDescriptor(writer, ((MethodTypeEncodedValue)encodedValue).getValue()); break; case ValueType.METHOD_HANDLE:
break; case ValueType.METHOD_TYPE: ReferenceUtil.writeMethodProtoDescriptor(writer, ((MethodTypeEncodedValue)encodedValue).getValue()); break; case ValueType.METHOD_HANDLE:
return; case ReferenceType.METHOD_PROTO: ReferenceUtil.writeMethodProtoDescriptor(writer, (MethodProtoReference)reference); return; case ReferenceType.METHOD_HANDLE:
return; case ReferenceType.METHOD_PROTO: ReferenceUtil.writeMethodProtoDescriptor(writer, (MethodProtoReference)reference); return; case ReferenceType.METHOD_HANDLE: