public class com.sun.xml.internal.bind.v2.util.EditDistance
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: com.sun.xml.internal.bind.v2.util.EditDistance
super_class: java.lang.Object
{
private static final java.util.WeakHashMap<java.util.AbstractMap$SimpleEntry<java.lang.String, java.lang.String>, java.lang.Integer> CACHE;
descriptor: Ljava/util/WeakHashMap;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
Signature: Ljava/util/WeakHashMap<Ljava/util/AbstractMap$SimpleEntry<Ljava/lang/String;Ljava/lang/String;>;Ljava/lang/Integer;>;
private int[] cost;
descriptor: [I
flags: (0x0002) ACC_PRIVATE
private int[] back;
descriptor: [I
flags: (0x0002) ACC_PRIVATE
private final java.lang.String a;
descriptor: Ljava/lang/String;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.lang.String b;
descriptor: Ljava/lang/String;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: new java.util.WeakHashMap
dup
invokespecial java.util.WeakHashMap.<init>:()V
putstatic com.sun.xml.internal.bind.v2.util.EditDistance.CACHE:Ljava/util/WeakHashMap;
return
LocalVariableTable:
Start End Slot Name Signature
public static int editDistance(java.lang.String, java.lang.String);
descriptor: (Ljava/lang/String;Ljava/lang/String;)I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=4, args_size=2
start local 0 start local 1 0: new java.util.AbstractMap$SimpleEntry
dup
aload 0
aload 1
invokespecial java.util.AbstractMap$SimpleEntry.<init>:(Ljava/lang/Object;Ljava/lang/Object;)V
astore 2
start local 2 1: aconst_null
astore 3
start local 3 2: getstatic com.sun.xml.internal.bind.v2.util.EditDistance.CACHE:Ljava/util/WeakHashMap;
aload 2
invokevirtual java.util.WeakHashMap.containsKey:(Ljava/lang/Object;)Z
ifeq 4
3: getstatic com.sun.xml.internal.bind.v2.util.EditDistance.CACHE:Ljava/util/WeakHashMap;
aload 2
invokevirtual java.util.WeakHashMap.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.lang.Integer
astore 3
4: StackMap locals: java.util.AbstractMap$SimpleEntry java.lang.Integer
StackMap stack:
aload 3
ifnonnull 7
5: new com.sun.xml.internal.bind.v2.util.EditDistance
dup
aload 0
aload 1
invokespecial com.sun.xml.internal.bind.v2.util.EditDistance.<init>:(Ljava/lang/String;Ljava/lang/String;)V
invokevirtual com.sun.xml.internal.bind.v2.util.EditDistance.calc:()I
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
astore 3
6: getstatic com.sun.xml.internal.bind.v2.util.EditDistance.CACHE:Ljava/util/WeakHashMap;
aload 2
aload 3
invokevirtual java.util.WeakHashMap.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
7: StackMap locals:
StackMap stack:
aload 3
invokevirtual java.lang.Integer.intValue:()I
ireturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 a Ljava/lang/String;
0 8 1 b Ljava/lang/String;
1 8 2 entry Ljava/util/AbstractMap$SimpleEntry<Ljava/lang/String;Ljava/lang/String;>;
2 8 3 result Ljava/lang/Integer;
MethodParameters:
Name Flags
a
b
public static java.lang.String findNearest(java.lang.String, java.lang.String[]);
descriptor: (Ljava/lang/String;[Ljava/lang/String;)Ljava/lang/String;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokestatic java.util.Arrays.asList:([Ljava/lang/Object;)Ljava/util/List;
invokestatic com.sun.xml.internal.bind.v2.util.EditDistance.findNearest:(Ljava/lang/String;Ljava/util/Collection;)Ljava/lang/String;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 key Ljava/lang/String;
0 1 1 group [Ljava/lang/String;
MethodParameters:
Name Flags
key
group
public static java.lang.String findNearest(java.lang.String, java.util.Collection<java.lang.String>);
descriptor: (Ljava/lang/String;Ljava/util/Collection;)Ljava/lang/String;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=7, args_size=2
start local 0 start local 1 0: ldc 2147483647
istore 2
start local 2 1: aconst_null
astore 3
start local 3 2: aload 1
invokeinterface java.util.Collection.iterator:()Ljava/util/Iterator;
astore 5
goto 8
StackMap locals: java.lang.String java.util.Collection int java.lang.String top java.util.Iterator
StackMap stack:
3: aload 5
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.lang.String
astore 4
start local 4 4: aload 0
aload 4
invokestatic com.sun.xml.internal.bind.v2.util.EditDistance.editDistance:(Ljava/lang/String;Ljava/lang/String;)I
istore 6
start local 6 5: iload 2
iload 6
if_icmple 8
6: iload 6
istore 2
7: aload 4
astore 3
end local 6 end local 4 8: StackMap locals:
StackMap stack:
aload 5
invokeinterface java.util.Iterator.hasNext:()Z
ifne 3
9: aload 3
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 key Ljava/lang/String;
0 10 1 group Ljava/util/Collection<Ljava/lang/String;>;
1 10 2 c I
2 10 3 r Ljava/lang/String;
4 8 4 s Ljava/lang/String;
5 8 6 ed I
Signature: (Ljava/lang/String;Ljava/util/Collection<Ljava/lang/String;>;)Ljava/lang/String;
MethodParameters:
Name Flags
key
group
private void <init>(java.lang.String, java.lang.String);
descriptor: (Ljava/lang/String;Ljava/lang/String;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
aload 1
putfield com.sun.xml.internal.bind.v2.util.EditDistance.a:Ljava/lang/String;
2: aload 0
aload 2
putfield com.sun.xml.internal.bind.v2.util.EditDistance.b:Ljava/lang/String;
3: aload 0
aload 1
invokevirtual java.lang.String.length:()I
iconst_1
iadd
newarray 10
putfield com.sun.xml.internal.bind.v2.util.EditDistance.cost:[I
4: aload 0
aload 1
invokevirtual java.lang.String.length:()I
iconst_1
iadd
newarray 10
putfield com.sun.xml.internal.bind.v2.util.EditDistance.back:[I
5: iconst_0
istore 3
start local 3 6: goto 9
7: StackMap locals: com.sun.xml.internal.bind.v2.util.EditDistance java.lang.String java.lang.String int
StackMap stack:
aload 0
getfield com.sun.xml.internal.bind.v2.util.EditDistance.cost:[I
iload 3
iload 3
iastore
8: iinc 3 1
StackMap locals:
StackMap stack:
9: iload 3
aload 1
invokevirtual java.lang.String.length:()I
if_icmple 7
end local 3 10: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lcom/sun/xml/internal/bind/v2/util/EditDistance;
0 11 1 a Ljava/lang/String;
0 11 2 b Ljava/lang/String;
6 10 3 i I
MethodParameters:
Name Flags
a
b
private void flip();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=2, args_size=1
start local 0 0: aload 0
getfield com.sun.xml.internal.bind.v2.util.EditDistance.cost:[I
astore 1
start local 1 1: aload 0
aload 0
getfield com.sun.xml.internal.bind.v2.util.EditDistance.back:[I
putfield com.sun.xml.internal.bind.v2.util.EditDistance.cost:[I
2: aload 0
aload 1
putfield com.sun.xml.internal.bind.v2.util.EditDistance.back:[I
3: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lcom/sun/xml/internal/bind/v2/util/EditDistance;
1 4 1 t [I
private int min(int, int, int);
descriptor: (III)I
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: iload 1
iload 2
iload 3
invokestatic java.lang.Math.min:(II)I
invokestatic java.lang.Math.min:(II)I
ireturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/sun/xml/internal/bind/v2/util/EditDistance;
0 1 1 a I
0 1 2 b I
0 1 3 c I
MethodParameters:
Name Flags
a
b
c
private int calc();
descriptor: ()I
flags: (0x0002) ACC_PRIVATE
Code:
stack=8, locals=4, args_size=1
start local 0 0: iconst_0
istore 1
start local 1 1: goto 13
2: StackMap locals: int
StackMap stack:
aload 0
invokevirtual com.sun.xml.internal.bind.v2.util.EditDistance.flip:()V
3: aload 0
getfield com.sun.xml.internal.bind.v2.util.EditDistance.cost:[I
iconst_0
iload 1
iconst_1
iadd
iastore
4: iconst_0
istore 2
start local 2 5: goto 11
6: StackMap locals: int
StackMap stack:
aload 0
getfield com.sun.xml.internal.bind.v2.util.EditDistance.a:Ljava/lang/String;
iload 2
invokevirtual java.lang.String.charAt:(I)C
aload 0
getfield com.sun.xml.internal.bind.v2.util.EditDistance.b:Ljava/lang/String;
iload 1
invokevirtual java.lang.String.charAt:(I)C
if_icmpne 7
iconst_0
goto 8
StackMap locals:
StackMap stack:
7: iconst_1
StackMap locals:
StackMap stack: int
8: istore 3
start local 3 9: aload 0
getfield com.sun.xml.internal.bind.v2.util.EditDistance.cost:[I
iload 2
iconst_1
iadd
aload 0
aload 0
getfield com.sun.xml.internal.bind.v2.util.EditDistance.back:[I
iload 2
iaload
iload 3
iadd
aload 0
getfield com.sun.xml.internal.bind.v2.util.EditDistance.cost:[I
iload 2
iaload
iconst_1
iadd
aload 0
getfield com.sun.xml.internal.bind.v2.util.EditDistance.back:[I
iload 2
iconst_1
iadd
iaload
iconst_1
iadd
invokevirtual com.sun.xml.internal.bind.v2.util.EditDistance.min:(III)I
iastore
end local 3 10: iinc 2 1
StackMap locals:
StackMap stack:
11: iload 2
aload 0
getfield com.sun.xml.internal.bind.v2.util.EditDistance.a:Ljava/lang/String;
invokevirtual java.lang.String.length:()I
if_icmplt 6
end local 2 12: iinc 1 1
StackMap locals:
StackMap stack:
13: iload 1
aload 0
getfield com.sun.xml.internal.bind.v2.util.EditDistance.b:Ljava/lang/String;
invokevirtual java.lang.String.length:()I
if_icmplt 2
end local 1 14: aload 0
getfield com.sun.xml.internal.bind.v2.util.EditDistance.cost:[I
aload 0
getfield com.sun.xml.internal.bind.v2.util.EditDistance.a:Ljava/lang/String;
invokevirtual java.lang.String.length:()I
iaload
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 15 0 this Lcom/sun/xml/internal/bind/v2/util/EditDistance;
1 14 1 j I
5 12 2 i I
9 10 3 match I
}
SourceFile: "EditDistance.java"
InnerClasses:
public SimpleEntry = java.util.AbstractMap$SimpleEntry of java.util.AbstractMap