Java Code Examples for sun.jvm.hotspot.oops.Klass#equals()
The following examples show how to use
sun.jvm.hotspot.oops.Klass#equals() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ReferenceTypeImpl.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
public int compareTo(ReferenceType refType) { /* * Note that it is critical that compareTo() == 0 * implies that equals() == true. Otherwise, TreeSet * will collapse classes. * * (Classes of the same name loaded by different class loaders * or in different VMs must not return 0). */ ReferenceTypeImpl other = (ReferenceTypeImpl)refType; int comp = name().compareTo(other.name()); if (comp == 0) { Klass rf1 = ref(); Klass rf2 = other.ref(); // optimize for typical case: refs equal and VMs equal if (rf1.equals(rf2)) { // sequenceNumbers are always positive comp = vm.sequenceNumber - ((VirtualMachineImpl)(other.virtualMachine())).sequenceNumber; } else { comp = rf1.getAddress().minus(rf2.getAddress()) < 0? -1 : 1; } } return comp; }
Example 2
Source File: ReferenceTypeImpl.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
public int compareTo(ReferenceType refType) { /* * Note that it is critical that compareTo() == 0 * implies that equals() == true. Otherwise, TreeSet * will collapse classes. * * (Classes of the same name loaded by different class loaders * or in different VMs must not return 0). */ ReferenceTypeImpl other = (ReferenceTypeImpl)refType; int comp = name().compareTo(other.name()); if (comp == 0) { Klass rf1 = ref(); Klass rf2 = other.ref(); // optimize for typical case: refs equal and VMs equal if (rf1.equals(rf2)) { // sequenceNumbers are always positive comp = vm.sequenceNumber - ((VirtualMachineImpl)(other.virtualMachine())).sequenceNumber; } else { comp = rf1.getAddress().minus(rf2.getAddress()) < 0? -1 : 1; } } return comp; }
Example 3
Source File: ReferenceTypeImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
public int compareTo(ReferenceType refType) { /* * Note that it is critical that compareTo() == 0 * implies that equals() == true. Otherwise, TreeSet * will collapse classes. * * (Classes of the same name loaded by different class loaders * or in different VMs must not return 0). */ ReferenceTypeImpl other = (ReferenceTypeImpl)refType; int comp = name().compareTo(other.name()); if (comp == 0) { Klass rf1 = ref(); Klass rf2 = other.ref(); // optimize for typical case: refs equal and VMs equal if (rf1.equals(rf2)) { // sequenceNumbers are always positive comp = vm.sequenceNumber - ((VirtualMachineImpl)(other.virtualMachine())).sequenceNumber; } else { comp = rf1.getAddress().minus(rf2.getAddress()) < 0? -1 : 1; } } return comp; }
Example 4
Source File: ReferenceTypeImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
public int compareTo(ReferenceType refType) { /* * Note that it is critical that compareTo() == 0 * implies that equals() == true. Otherwise, TreeSet * will collapse classes. * * (Classes of the same name loaded by different class loaders * or in different VMs must not return 0). */ ReferenceTypeImpl other = (ReferenceTypeImpl)refType; int comp = name().compareTo(other.name()); if (comp == 0) { Klass rf1 = ref(); Klass rf2 = other.ref(); // optimize for typical case: refs equal and VMs equal if (rf1.equals(rf2)) { // sequenceNumbers are always positive comp = vm.sequenceNumber - ((VirtualMachineImpl)(other.virtualMachine())).sequenceNumber; } else { comp = rf1.getAddress().minus(rf2.getAddress()) < 0? -1 : 1; } } return comp; }
Example 5
Source File: ReferenceTypeImpl.java From hottub with GNU General Public License v2.0 | 6 votes |
public int compareTo(ReferenceType refType) { /* * Note that it is critical that compareTo() == 0 * implies that equals() == true. Otherwise, TreeSet * will collapse classes. * * (Classes of the same name loaded by different class loaders * or in different VMs must not return 0). */ ReferenceTypeImpl other = (ReferenceTypeImpl)refType; int comp = name().compareTo(other.name()); if (comp == 0) { Klass rf1 = ref(); Klass rf2 = other.ref(); // optimize for typical case: refs equal and VMs equal if (rf1.equals(rf2)) { // sequenceNumbers are always positive comp = vm.sequenceNumber - ((VirtualMachineImpl)(other.virtualMachine())).sequenceNumber; } else { comp = rf1.getAddress().minus(rf2.getAddress()) < 0? -1 : 1; } } return comp; }
Example 6
Source File: ReferenceTypeImpl.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
public int compareTo(ReferenceType refType) { /* * Note that it is critical that compareTo() == 0 * implies that equals() == true. Otherwise, TreeSet * will collapse classes. * * (Classes of the same name loaded by different class loaders * or in different VMs must not return 0). */ ReferenceTypeImpl other = (ReferenceTypeImpl)refType; int comp = name().compareTo(other.name()); if (comp == 0) { Klass rf1 = ref(); Klass rf2 = other.ref(); // optimize for typical case: refs equal and VMs equal if (rf1.equals(rf2)) { // sequenceNumbers are always positive comp = vm.sequenceNumber - ((VirtualMachineImpl)(other.virtualMachine())).sequenceNumber; } else { comp = rf1.getAddress().minus(rf2.getAddress()) < 0? -1 : 1; } } return comp; }
Example 7
Source File: ReferenceTypeImpl.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
public int compareTo(ReferenceType refType) { /* * Note that it is critical that compareTo() == 0 * implies that equals() == true. Otherwise, TreeSet * will collapse classes. * * (Classes of the same name loaded by different class loaders * or in different VMs must not return 0). */ ReferenceTypeImpl other = (ReferenceTypeImpl)refType; int comp = name().compareTo(other.name()); if (comp == 0) { Klass rf1 = ref(); Klass rf2 = other.ref(); // optimize for typical case: refs equal and VMs equal if (rf1.equals(rf2)) { // sequenceNumbers are always positive comp = vm.sequenceNumber - ((VirtualMachineImpl)(other.virtualMachine())).sequenceNumber; } else { comp = rf1.getAddress().minus(rf2.getAddress()) < 0? -1 : 1; } } return comp; }