com.android.dx.io.instructions
Enum InstructionCodec

java.lang.Object
  extended by java.lang.Enum<InstructionCodec>
      extended by com.android.dx.io.instructions.InstructionCodec
All Implemented Interfaces:
Serializable, Comparable<InstructionCodec>

public enum InstructionCodec
extends Enum<InstructionCodec>

Representation of an instruction format, which knows how to decode into and encode from instances of DecodedInstruction.


Enum Constant Summary
FORMAT_00X
           
FORMAT_10T
           
FORMAT_10X
           
FORMAT_11N
           
FORMAT_11X
           
FORMAT_12X
           
FORMAT_20BC
           
FORMAT_20T
           
FORMAT_21C
           
FORMAT_21H
           
FORMAT_21S
           
FORMAT_21T
           
FORMAT_22B
           
FORMAT_22C
           
FORMAT_22CS
           
FORMAT_22S
           
FORMAT_22T
           
FORMAT_22X
           
FORMAT_23X
           
FORMAT_30T
           
FORMAT_31C
           
FORMAT_31I
           
FORMAT_31T
           
FORMAT_32X
           
FORMAT_35C
           
FORMAT_35MI
           
FORMAT_35MS
           
FORMAT_3RC
           
FORMAT_3RMI
           
FORMAT_3RMS
           
FORMAT_51L
           
FORMAT_FILL_ARRAY_DATA_PAYLOAD
           
FORMAT_PACKED_SWITCH_PAYLOAD
           
FORMAT_SPARSE_SWITCH_PAYLOAD
           
 
Method Summary
abstract  DecodedInstruction decode(int opcodeUnit, CodeInput in)
          Decodes an instruction specified by the given opcode unit, reading any required additional code units from the given input source.
abstract  void encode(DecodedInstruction insn, CodeOutput out)
          Encodes the given instruction.
static InstructionCodec valueOf(String name)
          Returns the enum constant of this type with the specified name.
static InstructionCodec[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

FORMAT_00X

public static final InstructionCodec FORMAT_00X

FORMAT_10X

public static final InstructionCodec FORMAT_10X

FORMAT_12X

public static final InstructionCodec FORMAT_12X

FORMAT_11N

public static final InstructionCodec FORMAT_11N

FORMAT_11X

public static final InstructionCodec FORMAT_11X

FORMAT_10T

public static final InstructionCodec FORMAT_10T

FORMAT_20T

public static final InstructionCodec FORMAT_20T

FORMAT_20BC

public static final InstructionCodec FORMAT_20BC

FORMAT_22X

public static final InstructionCodec FORMAT_22X

FORMAT_21T

public static final InstructionCodec FORMAT_21T

FORMAT_21S

public static final InstructionCodec FORMAT_21S

FORMAT_21H

public static final InstructionCodec FORMAT_21H

FORMAT_21C

public static final InstructionCodec FORMAT_21C

FORMAT_23X

public static final InstructionCodec FORMAT_23X

FORMAT_22B

public static final InstructionCodec FORMAT_22B

FORMAT_22T

public static final InstructionCodec FORMAT_22T

FORMAT_22S

public static final InstructionCodec FORMAT_22S

FORMAT_22C

public static final InstructionCodec FORMAT_22C

FORMAT_22CS

public static final InstructionCodec FORMAT_22CS

FORMAT_30T

public static final InstructionCodec FORMAT_30T

FORMAT_32X

public static final InstructionCodec FORMAT_32X

FORMAT_31I

public static final InstructionCodec FORMAT_31I

FORMAT_31T

public static final InstructionCodec FORMAT_31T

FORMAT_31C

public static final InstructionCodec FORMAT_31C

FORMAT_35C

public static final InstructionCodec FORMAT_35C

FORMAT_35MS

public static final InstructionCodec FORMAT_35MS

FORMAT_35MI

public static final InstructionCodec FORMAT_35MI

FORMAT_3RC

public static final InstructionCodec FORMAT_3RC

FORMAT_3RMS

public static final InstructionCodec FORMAT_3RMS

FORMAT_3RMI

public static final InstructionCodec FORMAT_3RMI

FORMAT_51L

public static final InstructionCodec FORMAT_51L

FORMAT_PACKED_SWITCH_PAYLOAD

public static final InstructionCodec FORMAT_PACKED_SWITCH_PAYLOAD

FORMAT_SPARSE_SWITCH_PAYLOAD

public static final InstructionCodec FORMAT_SPARSE_SWITCH_PAYLOAD

FORMAT_FILL_ARRAY_DATA_PAYLOAD

public static final InstructionCodec FORMAT_FILL_ARRAY_DATA_PAYLOAD
Method Detail

values

public static InstructionCodec[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (InstructionCodec c : InstructionCodec.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static InstructionCodec valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

decode

public abstract DecodedInstruction decode(int opcodeUnit,
                                          CodeInput in)
                                   throws EOFException
Decodes an instruction specified by the given opcode unit, reading any required additional code units from the given input source.

Throws:
EOFException

encode

public abstract void encode(DecodedInstruction insn,
                            CodeOutput out)
Encodes the given instruction.



Copyright © 2015. All rights reserved.