Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
* This program is free software; you can redistribute it and/or modify
* it , under the terms of the GNU General Public License as published
* by the Free Software Foundation; either version 2 of the License,
* or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program.If not, write to
* The Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
package jreversepro.revengine;
import jreversepro.common.Helper;
import jreversepro.common.JJvmOpcodes;
import jreversepro.common.KeyWords;
import jreversepro.reflect.JInstruction;
import jreversepro.reflect.JMethod;
import jreversepro.runtime.Operand;
import java.io.ByteArrayInputStream;
import java.io.DataInputStream;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Vector;
/**
* JSwitchTable represents the 'switch' statement as entry pairs as
* follows.
* Pair = { CaseValues, Targets }.
*
* @author Karthik Kumar
*/
public class JSwitchTable implements KeyWords, JJvmOpcodes {
/**
* Instruction index of the switch statement.
*/
final int insIndex;
/**
* Reference to method to which this
* switch table belongs.
*/
final JMethod method;
/**
* List of cases that are available.
* Individual elements are JCaseEntry.
*/
List cases;
/**
* Datatype of the variable for which switch is used.
*/
String datatype;
/**
* DefaultByte for this switch statement.
*/
int defaultByte;
/**
* Max Target from this switch statement group *
*/
int maxTarget;
/**
* Name of the variable that is put under switch statement.
*/
String varName;
/**
* @param method Reference to current method.
* @param ins Instruction that corresponds to a
* tableswitch or a lookupswitch instruction.
* @param gotos Map of goto statements.
* @throws IOException thrown in case of any error.
* @throws RevEngineException if the instruction passed is not
* a switch opcode.
*/
public JSwitchTable(JMethod method, JInstruction ins, Map