Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/techtrader/modules/tools/bytecode/RetInstruction.java


1   package com.techtrader.modules.tools.bytecode;
2   
3   
4   import java.io.IOException;
5   import java.io.DataInput;
6   import java.io.DataOutput;
7   
8   import com.techtrader.modules.tools.bytecode.visitor.BCVisitor;
9   
10  
11  /**
12   *  Represents the RET instruction used in the implementation of finally.
13   *
14   *  @author    Abe White
15   */
16  public class RetInstruction
17    extends LocalVariableInstruction
18  {
19    protected RetInstruction (Code owner)
20    {
21      super (owner);
22      _opcode = RET;
23    }
24  
25  
26    public boolean equals (Object other)
27    {
28      if (this == other)
29        return true;
30      if (!(other instanceof RetInstruction))
31        return false;
32      return super.equals (other);
33    }
34  
35  
36    public int getLength ()
37    {
38      return super.getLength () + 1;
39    }
40  
41  
42    protected void readData (DataInput in)
43      throws IOException
44    {
45      _index = in.readUnsignedByte ();
46    }
47  
48  
49    protected void writeData (DataOutput out)
50      throws IOException
51    {
52      out.writeByte (_index);
53    }
54  
55  
56    public void acceptVisit (BCVisitor visit)
57    {
58      visit.enterRetInstruction (this);
59      visit.exitRetInstruction (this);
60    }
61  }