com.sun.tools.javac.jvm
Class Items.Item

java.lang.Object
  extended by com.sun.tools.javac.jvm.Items.Item
Direct Known Subclasses:
Items.AssignItem, Items.CondItem, Items.ImmediateItem, Items.IndexedItem, Items.LocalItem, Items.MemberItem, Items.SelfItem, Items.StackItem, Items.StaticItem
Enclosing class:
Items

abstract class Items.Item
extends java.lang.Object

The base class of all items, which implements default behavior.


Field Summary
(package private)  int typecode
          The type code of values represented by this item.
 
Constructor Summary
Items.Item(int typecode)
           
 
Method Summary
(package private)  Items.Item coerce(int targetcode)
          Generate code to coerce item to given type code.
(package private)  Items.Item coerce(Type targettype)
          Generate code to coerce item to given type.
(package private)  void drop()
          Generate code to avoid having to use this item.
(package private)  void duplicate()
          Generate code to use this item twice.
(package private)  Items.Item invoke()
          Generate code to invoke method represented by this item.
(package private)  Items.Item load()
          Generate code to load this item onto stack.
(package private)  Items.CondItem mkCond()
          Generate code to turn item into a testable condition.
(package private)  void stash(int toscode)
          Generate code to stash a copy of top of stack - of typecode toscode - under this item.
(package private)  void store()
          Generate code to store top of stack into this item.
abstract  java.lang.String toString()
           
(package private)  int width()
          Return the width of this item on stack as a number of words.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

typecode

int typecode
The type code of values represented by this item.

Constructor Detail

Items.Item

Items.Item(int typecode)
Method Detail

load

Items.Item load()
Generate code to load this item onto stack.


store

void store()
Generate code to store top of stack into this item.


invoke

Items.Item invoke()
Generate code to invoke method represented by this item.


duplicate

void duplicate()
Generate code to use this item twice.


drop

void drop()
Generate code to avoid having to use this item.


stash

void stash(int toscode)
Generate code to stash a copy of top of stack - of typecode toscode - under this item.


mkCond

Items.CondItem mkCond()
Generate code to turn item into a testable condition.


coerce

Items.Item coerce(int targetcode)
Generate code to coerce item to given type code.

Parameters:
targetcode - The type code to coerce to.

coerce

Items.Item coerce(Type targettype)
Generate code to coerce item to given type.

Parameters:
targettype - The type to coerce to.

width

int width()
Return the width of this item on stack as a number of words.


toString

public abstract java.lang.String toString()
Overrides:
toString in class java.lang.Object