1 28 29 package org.jibx.binding.classes; 30 31 import org.apache.bcel.generic.InstructionHandle; 32 33 41 42 public class BranchTarget 43 { 44 45 private final InstructionHandle m_targetHandle; 46 47 48 private final String [] m_stackTypes; 49 50 56 57 BranchTarget(InstructionHandle hand, String [] types) { 58 m_targetHandle = hand; 59 m_stackTypes = types; 60 } 61 62 67 68 InstructionHandle getInstruction() { 69 return m_targetHandle; 70 } 71 72 77 78 String [] getStack() { 79 return m_stackTypes; 80 } 81 82 89 90 boolean matchStacks(String [] types) { 91 92 if (types.length == m_stackTypes.length) { 94 for (int i = 0; i < types.length; i++) { 95 if (!types[i].equals(m_stackTypes[i])) { 96 return false; 97 } 98 } 99 return true; 100 } else { 101 return false; 102 } 103 } 104 } | Popular Tags |