|
Java example source code file (TestCaseSwitch.java)
The TestCaseSwitch.java Java example source code/* /nodynamiccopyright/ */ public class TestCaseSwitch { @AliveRange(varName="o", bytecodeStart=31, bytecodeLength=16) @AliveRange(varName="o", bytecodeStart=50, bytecodeLength=15) @AliveRange(varName="o", bytecodeStart=68, bytecodeLength=1) @AliveRange(varName="oo", bytecodeStart=39, bytecodeLength=26) @AliveRange(varName="uu", bytecodeStart=59, bytecodeLength=6) void m1(String[] args) { Object o; switch (args.length) { case 0: o = "0"; o.hashCode(); Object oo = "oo"; oo.hashCode(); break; case 1: o = "1"; o.hashCode(); Object uu = "uu"; uu.hashCode(); break; } o = "return"; } @AliveRange(varName="o", bytecodeStart=95, bytecodeLength=18) @AliveRange(varName="o", bytecodeStart=116, bytecodeLength=15) @AliveRange(varName="o", bytecodeStart=134, bytecodeLength=1) @AliveRange(varName="oo", bytecodeStart=104, bytecodeLength=27) @AliveRange(varName="uu", bytecodeStart=125, bytecodeLength=6) void m2(String[] args) { Object o; switch (args[0]) { case "string0": o = "0"; o.hashCode(); Object oo = "oo"; oo.hashCode(); break; case "string1": o = "1"; o.hashCode(); Object uu = "uu"; uu.hashCode(); break; } o = "return"; } @AliveRange(varName="o", bytecodeStart=31, bytecodeLength=8) @AliveRange(varName="o", bytecodeStart=42, bytecodeLength=8) @AliveRange(varName="o", bytecodeStart=53, bytecodeLength=9) void m3(String[] args) { Object o; switch (args.length) { case 0: o = "0"; o.hashCode(); break; case 1: o = "1"; o.hashCode(); break; default: o = "default"; o.hashCode(); } o = "finish"; } } Other Java examples (source code examples)Here is a short list of links related to this Java TestCaseSwitch.java source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.