src/jdk.jdi/share/classes/com/sun/tools/jdi/VirtualMachineImpl.java

Print this page
rev 10552 : 8055723[core]: Replace concat String to append in StringBuilder parameters
Contributed-by: Otavio Santana <otaviojava@java.net>


 864     InterfaceTypeImpl interfaceType(long ref) {
 865         return (InterfaceTypeImpl)referenceType(ref, JDWP.TypeTag.INTERFACE, null);
 866     }
 867 
 868     ArrayTypeImpl arrayType(long ref) {
 869         return (ArrayTypeImpl)referenceType(ref, JDWP.TypeTag.ARRAY, null);
 870     }
 871 
 872     ReferenceTypeImpl referenceType(long id, int tag,
 873                                                  String signature) {
 874         if ((vm.traceFlags & VirtualMachine.TRACE_REFTYPES) != 0) {
 875             StringBuilder sb = new StringBuilder();
 876             sb.append("Looking up ");
 877             if (tag == JDWP.TypeTag.CLASS) {
 878                 sb.append("Class");
 879             } else if (tag == JDWP.TypeTag.INTERFACE) {
 880                 sb.append("Interface");
 881             } else if (tag == JDWP.TypeTag.ARRAY) {
 882                 sb.append("ArrayType");
 883             } else {
 884                 sb.append("UNKNOWN TAG: " + tag);
 885             }
 886             if (signature != null) {
 887                 sb.append(", signature='" + signature + "'");
 888             }
 889             sb.append(", id=" + id);
 890             vm.printTrace(sb.toString());
 891         }
 892         if (id == 0) {
 893             return null;
 894         } else {
 895             ReferenceTypeImpl retType = null;
 896             synchronized (this) {
 897                 if (typesByID != null) {
 898                     retType = (ReferenceTypeImpl)typesByID.get(id);
 899                 }
 900                 if (retType == null) {
 901                     retType = addReferenceType(id, tag, signature);
 902                 }
 903             }
 904             return retType;
 905         }
 906     }
 907 
 908     private JDWP.VirtualMachine.Capabilities capabilities() {
 909         if (capabilities == null) {




 864     InterfaceTypeImpl interfaceType(long ref) {
 865         return (InterfaceTypeImpl)referenceType(ref, JDWP.TypeTag.INTERFACE, null);
 866     }
 867 
 868     ArrayTypeImpl arrayType(long ref) {
 869         return (ArrayTypeImpl)referenceType(ref, JDWP.TypeTag.ARRAY, null);
 870     }
 871 
 872     ReferenceTypeImpl referenceType(long id, int tag,
 873                                                  String signature) {
 874         if ((vm.traceFlags & VirtualMachine.TRACE_REFTYPES) != 0) {
 875             StringBuilder sb = new StringBuilder();
 876             sb.append("Looking up ");
 877             if (tag == JDWP.TypeTag.CLASS) {
 878                 sb.append("Class");
 879             } else if (tag == JDWP.TypeTag.INTERFACE) {
 880                 sb.append("Interface");
 881             } else if (tag == JDWP.TypeTag.ARRAY) {
 882                 sb.append("ArrayType");
 883             } else {
 884                 sb.append("UNKNOWN TAG: ").append(tag);
 885             }
 886             if (signature != null) {
 887                 sb.append(", signature='").append(signature).append('\'');
 888             }
 889             sb.append(", id=").append(id);
 890             vm.printTrace(sb.toString());
 891         }
 892         if (id == 0) {
 893             return null;
 894         } else {
 895             ReferenceTypeImpl retType = null;
 896             synchronized (this) {
 897                 if (typesByID != null) {
 898                     retType = (ReferenceTypeImpl)typesByID.get(id);
 899                 }
 900                 if (retType == null) {
 901                     retType = addReferenceType(id, tag, signature);
 902                 }
 903             }
 904             return retType;
 905         }
 906     }
 907 
 908     private JDWP.VirtualMachine.Capabilities capabilities() {
 909         if (capabilities == null) {