serp.bytecode
Class TypedInstruction

java.lang.Object
  extended by serp.bytecode.Instruction
      extended by serp.bytecode.TypedInstruction
All Implemented Interfaces:
BCEntity, VisitAcceptor
Direct Known Subclasses:
ArrayInstruction, ClassInstruction, CmpInstruction, ConstantInstruction, ConvertInstruction, LocalVariableInstruction, MathInstruction, NewArrayInstruction, ReturnInstruction, StackInstruction

public abstract class TypedInstruction
extends Instruction

Any typed instruction.

Author:
Abe White

Method Summary
 Class getType()
          Return the type for this instruction.
 BCClass getTypeBC()
          Return the type for this instruction.
abstract  String getTypeName()
          Return the type name for this instruction.
 TypedInstruction setType(BCClass type)
          Set the type of this instruction.
 TypedInstruction setType(Class type)
          Set the type of this instruction.
abstract  TypedInstruction setType(String type)
          Set the type of this instruction.
 
Methods inherited from class serp.bytecode.Instruction
acceptVisit, equalsInstruction, getByteIndex, getClassLoader, getCode, getLineNumber, getLogicalStackChange, getName, getOpcode, getPool, getProject, getStackChange, isValid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getTypeName

public abstract String getTypeName()
Return the type name for this instruction. If the type has not been set, this method will return null.


getType

public Class getType()
Return the type for this instruction. If the type has not been set, this method will return null.


getTypeBC

public BCClass getTypeBC()
Return the type for this instruction. If the type has not been set, this method will return null.


setType

public abstract TypedInstruction setType(String type)
Set the type of this instruction. Types that have no direct support will be converted accordingly.

Returns:
this instruction, for method chaining

setType

public TypedInstruction setType(Class type)
Set the type of this instruction. Types that have no direct support will be converted accordingly.

Returns:
this instruction, for method chaining

setType

public TypedInstruction setType(BCClass type)
Set the type of this instruction. Types that have no direct support will be converted accordingly.

Returns:
this instruction, for method chaining


Copyright © 2002-2007. All Rights Reserved.