/** {@inheritDoc} */ public String getConciseIdentity() { return "proto_id_item: " + getPrototypeString(); }
/** * @return a string formatted like methodName(TTTT..)R */ public String getVirtualMethodString() { if (cachedVirtualMethodString == null) { String methodName = this.methodName.getStringValue(); String prototypeString = methodPrototype.getPrototypeString(); StringBuilder sb = new StringBuilder(methodName.length() + prototypeString.length()); sb.append(methodName); sb.append(prototypeString); cachedVirtualMethodString = sb.toString(); } return cachedVirtualMethodString; }
/** * @return a string formatted like LclassName;->methodName(TTTT..)R */ public String getMethodString() { if (cachedMethodString == null) { String classType = this.classType.getTypeDescriptor(); String methodName = this.methodName.getStringValue(); String prototypeString = methodPrototype.getPrototypeString(); StringBuilder sb = new StringBuilder(classType.length() + methodName.length() + prototypeString.length() + 2); sb.append(classType); sb.append("->"); sb.append(methodName); sb.append(prototypeString); cachedMethodString = sb.toString(); } return cachedMethodString; }
/** {@inheritDoc} */ protected void writeItem(AnnotatedOutput out) { if (out.annotates()) { out.annotate(2, "class_type: " + classType.getTypeDescriptor()); out.annotate(2, "method_prototype: " + methodPrototype.getPrototypeString()); out.annotate(4, "method_name: " + methodName.getStringValue()); } int classIndex = classType.getIndex(); if (classIndex > 0xffff) { throw new RuntimeException(String.format("Error writing method_id_item for %s. The type index of " + "defining class %s is too large", getMethodString(), classType.getTypeDescriptor())); } out.writeShort(classIndex); int prototypeIndex = methodPrototype.getIndex(); if (prototypeIndex > 0xffff) { throw new RuntimeException(String.format("Error writing method_id_item for %0. The prototype index of " + "method prototype %s is too large", getMethodString(), methodPrototype.getPrototypeString())); } out.writeShort(prototypeIndex); out.writeInt(methodName.getIndex()); }
/** {@inheritDoc} */ public String getConciseIdentity() { return "proto_id_item: " + getPrototypeString(); }
/** * @return a string formatted like methodName(TTTT..)R */ public String getShortMethodString() { if (cachedShortMethodString == null) { String methodName = this.methodName.getStringValue(); String prototypeString = methodPrototype.getPrototypeString(); StringBuilder sb = new StringBuilder(methodName.length() + prototypeString.length()); sb.append(methodName); sb.append(prototypeString); cachedShortMethodString = sb.toString(); } return cachedShortMethodString; }
/** * @return a string formatted like LclassName;->methodName(TTTT..)R */ public String getMethodString() { if (cachedMethodString == null) { String classType = this.classType.getTypeDescriptor(); String methodName = this.methodName.getStringValue(); String prototypeString = methodPrototype.getPrototypeString(); StringBuilder sb = new StringBuilder(classType.length() + methodName.length() + prototypeString.length() + 2); sb.append(classType); sb.append("->"); sb.append(methodName); sb.append(prototypeString); cachedMethodString = sb.toString(); } return cachedMethodString; }
/** {@inheritDoc} */ protected void writeItem(AnnotatedOutput out) { if (out.annotates()) { out.annotate(2, "class_type: " + classType.getTypeDescriptor()); out.annotate(2, "method_prototype: " + methodPrototype.getPrototypeString()); out.annotate(4, "method_name: " + methodName.getStringValue()); } int classIndex = classType.getIndex(); if (classIndex > 0xffff) { throw new RuntimeException(String.format("Error writing method_id_item for %s. The type index of " + "defining class %s is too large", getMethodString(), classType.getTypeDescriptor())); } out.writeShort(classIndex); int prototypeIndex = methodPrototype.getIndex(); if (prototypeIndex > 0xffff) { throw new RuntimeException(String.format("Error writing method_id_item for %0. The prototype index of " + "method prototype %s is too large", getMethodString(), methodPrototype.getPrototypeString())); } out.writeShort(prototypeIndex); out.writeInt(methodName.getIndex()); }