public class org.jruby.ext.socket.SubnetUtils
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.jruby.ext.socket.SubnetUtils
super_class: java.lang.Object
{
private static final java.lang.String IP_ADDRESS;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})"
private static final java.lang.String SLASH_FORMAT;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})/(\\d{1,3})"
private static final java.util.regex.Pattern addressPattern;
descriptor: Ljava/util/regex/Pattern;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final java.util.regex.Pattern cidrPattern;
descriptor: Ljava/util/regex/Pattern;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final int NBITS;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 32
private int netmask;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private int address;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private int network;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private int broadcast;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private boolean inclusiveHostCount;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc "(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})"
invokestatic java.util.regex.Pattern.compile:(Ljava/lang/String;)Ljava/util/regex/Pattern;
putstatic org.jruby.ext.socket.SubnetUtils.addressPattern:Ljava/util/regex/Pattern;
1: ldc "(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})/(\\d{1,3})"
invokestatic java.util.regex.Pattern.compile:(Ljava/lang/String;)Ljava/util/regex/Pattern;
putstatic org.jruby.ext.socket.SubnetUtils.cidrPattern:Ljava/util/regex/Pattern;
2: return
LocalVariableTable:
Start End Slot Name Signature
public void <init>(java.lang.String);
descriptor: (Ljava/lang/String;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
iconst_0
putfield org.jruby.ext.socket.SubnetUtils.netmask:I
2: aload 0
iconst_0
putfield org.jruby.ext.socket.SubnetUtils.address:I
3: aload 0
iconst_0
putfield org.jruby.ext.socket.SubnetUtils.network:I
4: aload 0
iconst_0
putfield org.jruby.ext.socket.SubnetUtils.broadcast:I
5: aload 0
iconst_0
putfield org.jruby.ext.socket.SubnetUtils.inclusiveHostCount:Z
6: aload 0
aload 1
invokevirtual org.jruby.ext.socket.SubnetUtils.calculate:(Ljava/lang/String;)V
7: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lorg/jruby/ext/socket/SubnetUtils;
0 8 1 cidrNotation Ljava/lang/String;
MethodParameters:
Name Flags
cidrNotation
public void <init>(java.lang.String, java.lang.String);
descriptor: (Ljava/lang/String;Ljava/lang/String;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
iconst_0
putfield org.jruby.ext.socket.SubnetUtils.netmask:I
2: aload 0
iconst_0
putfield org.jruby.ext.socket.SubnetUtils.address:I
3: aload 0
iconst_0
putfield org.jruby.ext.socket.SubnetUtils.network:I
4: aload 0
iconst_0
putfield org.jruby.ext.socket.SubnetUtils.broadcast:I
5: aload 0
iconst_0
putfield org.jruby.ext.socket.SubnetUtils.inclusiveHostCount:Z
6: aload 0
aload 0
aload 1
aload 2
invokevirtual org.jruby.ext.socket.SubnetUtils.toCidrNotation:(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
invokevirtual org.jruby.ext.socket.SubnetUtils.calculate:(Ljava/lang/String;)V
7: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lorg/jruby/ext/socket/SubnetUtils;
0 8 1 address Ljava/lang/String;
0 8 2 mask Ljava/lang/String;
MethodParameters:
Name Flags
address
mask
public boolean isInclusiveHostCount();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jruby.ext.socket.SubnetUtils.inclusiveHostCount:Z
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/ext/socket/SubnetUtils;
public void setInclusiveHostCount(boolean);
descriptor: (Z)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
iload 1
putfield org.jruby.ext.socket.SubnetUtils.inclusiveHostCount:Z
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/jruby/ext/socket/SubnetUtils;
0 2 1 inclusiveHostCount Z
MethodParameters:
Name Flags
inclusiveHostCount
public final org.jruby.ext.socket.SubnetUtils$SubnetInfo getInfo();
descriptor: ()Lorg/jruby/ext/socket/SubnetUtils$SubnetInfo;
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
Code:
stack=3, locals=1, args_size=1
start local 0 0: new org.jruby.ext.socket.SubnetUtils$SubnetInfo
dup
aload 0
invokespecial org.jruby.ext.socket.SubnetUtils$SubnetInfo.<init>:(Lorg/jruby/ext/socket/SubnetUtils;)V
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/ext/socket/SubnetUtils;
private void calculate(java.lang.String);
descriptor: (Ljava/lang/String;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=5, args_size=2
start local 0 start local 1 0: getstatic org.jruby.ext.socket.SubnetUtils.cidrPattern:Ljava/util/regex/Pattern;
aload 1
invokevirtual java.util.regex.Pattern.matcher:(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
astore 2
start local 2 1: aload 2
invokevirtual java.util.regex.Matcher.matches:()Z
ifeq 12
2: aload 0
aload 0
aload 2
invokevirtual org.jruby.ext.socket.SubnetUtils.matchAddress:(Ljava/util/regex/Matcher;)I
putfield org.jruby.ext.socket.SubnetUtils.address:I
3: aload 0
aload 2
iconst_5
invokevirtual java.util.regex.Matcher.group:(I)Ljava/lang/String;
invokestatic java.lang.Integer.parseInt:(Ljava/lang/String;)I
iconst_0
bipush 32
invokevirtual org.jruby.ext.socket.SubnetUtils.rangeCheck:(III)I
istore 3
start local 3 4: iconst_0
istore 4
start local 4 5: goto 8
6: StackMap locals: java.util.regex.Matcher int int
StackMap stack:
aload 0
dup
getfield org.jruby.ext.socket.SubnetUtils.netmask:I
iconst_1
bipush 31
iload 4
isub
ishl
ior
putfield org.jruby.ext.socket.SubnetUtils.netmask:I
7: iinc 4 1
StackMap locals:
StackMap stack:
8: iload 4
iload 3
if_icmplt 6
end local 4 9: aload 0
aload 0
getfield org.jruby.ext.socket.SubnetUtils.address:I
aload 0
getfield org.jruby.ext.socket.SubnetUtils.netmask:I
iand
putfield org.jruby.ext.socket.SubnetUtils.network:I
10: aload 0
aload 0
getfield org.jruby.ext.socket.SubnetUtils.network:I
aload 0
getfield org.jruby.ext.socket.SubnetUtils.netmask:I
iconst_m1
ixor
ior
putfield org.jruby.ext.socket.SubnetUtils.broadcast:I
end local 3 11: goto 13
12: StackMap locals:
StackMap stack:
new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
ldc "Could not parse ["
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "]"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
13: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 this Lorg/jruby/ext/socket/SubnetUtils;
0 14 1 mask Ljava/lang/String;
1 14 2 matcher Ljava/util/regex/Matcher;
4 11 3 cidrPart I
5 9 4 j I
MethodParameters:
Name Flags
mask
private int toInteger(java.lang.String);
descriptor: (Ljava/lang/String;)I
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=3, args_size=2
start local 0 start local 1 0: getstatic org.jruby.ext.socket.SubnetUtils.addressPattern:Ljava/util/regex/Pattern;
aload 1
invokevirtual java.util.regex.Pattern.matcher:(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
astore 2
start local 2 1: aload 2
invokevirtual java.util.regex.Matcher.matches:()Z
ifeq 3
2: aload 0
aload 2
invokevirtual org.jruby.ext.socket.SubnetUtils.matchAddress:(Ljava/util/regex/Matcher;)I
ireturn
3: StackMap locals: java.util.regex.Matcher
StackMap stack:
new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
ldc "Could not parse ["
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "]"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/jruby/ext/socket/SubnetUtils;
0 4 1 address Ljava/lang/String;
1 4 2 matcher Ljava/util/regex/Matcher;
MethodParameters:
Name Flags
address
private int matchAddress(java.util.regex.Matcher);
descriptor: (Ljava/util/regex/Matcher;)I
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=5, args_size=2
start local 0 start local 1 0: iconst_0
istore 2
start local 2 1: iconst_1
istore 3
start local 3 2: goto 6
3: StackMap locals: int int
StackMap stack:
aload 0
aload 1
iload 3
invokevirtual java.util.regex.Matcher.group:(I)Ljava/lang/String;
invokestatic java.lang.Integer.parseInt:(Ljava/lang/String;)I
iconst_m1
sipush 255
invokevirtual org.jruby.ext.socket.SubnetUtils.rangeCheck:(III)I
istore 4
start local 4 4: iload 2
iload 4
sipush 255
iand
bipush 8
iconst_4
iload 3
isub
imul
ishl
ior
istore 2
end local 4 5: iinc 3 1
StackMap locals:
StackMap stack:
6: iload 3
iconst_4
if_icmple 3
end local 3 7: iload 2
ireturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lorg/jruby/ext/socket/SubnetUtils;
0 8 1 matcher Ljava/util/regex/Matcher;
1 8 2 addr I
2 7 3 i I
4 5 4 n I
MethodParameters:
Name Flags
matcher
private int[] toArray(int);
descriptor: (I)[I
flags: (0x0002) ACC_PRIVATE
Code:
stack=7, locals=4, args_size=2
start local 0 start local 1 0: iconst_4
newarray 10
astore 2
start local 2 1: iconst_3
istore 3
start local 3 2: goto 5
3: StackMap locals: int[] int
StackMap stack:
aload 2
iload 3
dup2
iaload
iload 1
bipush 8
iconst_3
iload 3
isub
imul
iushr
sipush 255
iand
ior
iastore
4: iinc 3 -1
StackMap locals:
StackMap stack:
5: iload 3
ifge 3
end local 3 6: aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/jruby/ext/socket/SubnetUtils;
0 7 1 val I
1 7 2 ret [I
2 6 3 j I
MethodParameters:
Name Flags
val
private java.lang.String format(int[]);
descriptor: ([I)Ljava/lang/String;
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=4, args_size=2
start local 0 start local 1 0: new java.lang.StringBuilder
dup
invokespecial java.lang.StringBuilder.<init>:()V
astore 2
start local 2 1: iconst_0
istore 3
start local 3 2: goto 7
3: StackMap locals: java.lang.StringBuilder int
StackMap stack:
aload 2
aload 1
iload 3
iaload
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
pop
4: iload 3
aload 1
arraylength
iconst_1
isub
if_icmpeq 6
5: aload 2
ldc "."
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
pop
6: StackMap locals:
StackMap stack:
iinc 3 1
StackMap locals:
StackMap stack:
7: iload 3
aload 1
arraylength
if_icmplt 3
end local 3 8: aload 2
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lorg/jruby/ext/socket/SubnetUtils;
0 9 1 octets [I
1 9 2 str Ljava/lang/StringBuilder;
2 8 3 i I
MethodParameters:
Name Flags
octets
private int rangeCheck(int, int, int);
descriptor: (III)I
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: iload 1
iload 2
if_icmple 2
iload 1
iload 3
if_icmpgt 2
1: iload 1
ireturn
2: StackMap locals:
StackMap stack:
new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
ldc "Value ["
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
iload 1
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
ldc "] not in range ("
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
iload 2
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
ldc ","
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
iload 3
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
ldc "]"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/jruby/ext/socket/SubnetUtils;
0 3 1 value I
0 3 2 begin I
0 3 3 end I
MethodParameters:
Name Flags
value
begin
end
int pop(int);
descriptor: (I)I
flags: (0x0000)
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: iload 1
iload 1
iconst_1
iushr
ldc 1431655765
iand
isub
istore 1
1: iload 1
ldc 858993459
iand
iload 1
iconst_2
iushr
ldc 858993459
iand
iadd
istore 1
2: iload 1
iload 1
iconst_4
iushr
iadd
ldc 252645135
iand
istore 1
3: iload 1
iload 1
bipush 8
iushr
iadd
istore 1
4: iload 1
iload 1
bipush 16
iushr
iadd
istore 1
5: iload 1
bipush 63
iand
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/jruby/ext/socket/SubnetUtils;
0 6 1 x I
MethodParameters:
Name Flags
x
private java.lang.String toCidrNotation(java.lang.String, java.lang.String);
descriptor: (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: new java.lang.StringBuilder
dup
aload 1
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc "/"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 0
aload 0
aload 2
invokevirtual org.jruby.ext.socket.SubnetUtils.toInteger:(Ljava/lang/String;)I
invokevirtual org.jruby.ext.socket.SubnetUtils.pop:(I)I
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/ext/socket/SubnetUtils;
0 1 1 addr Ljava/lang/String;
0 1 2 mask Ljava/lang/String;
MethodParameters:
Name Flags
addr
mask
}
SourceFile: "SubnetUtils.java"
NestMembers:
org.jruby.ext.socket.SubnetUtils$SubnetInfo
InnerClasses:
public final SubnetInfo = org.jruby.ext.socket.SubnetUtils$SubnetInfo of org.jruby.ext.socket.SubnetUtils