Top Description Inners Fields Constructors Methods
com.sun.tools.javac.jvm

public Class Items

extends Object
Class Inheritance
Imports
com.sun.tools.javac.code.*, com.sun.tools.javac.code.Symbol.*, com.sun.tools.javac.code.Type.*, com.sun.tools.javac.jvm.Code.*, .PoolConstant.LoadableConstant, .PoolConstant.LoadableConstant.BasicConstant, com.sun.tools.javac.tree.JCTree, com.sun.tools.javac.util.Assert

A helper class for code generation. Items are objects that stand for addressable entities in the bytecode. Each item supports a fixed protocol for loading the item on the stack, storing into it, converting it into a jump condition, and several others. There are many individual forms of items, such as local, static, indexed, or instance variables, values on the top of stack, the special values this or super, etc. Individual items are represented as inner classes in class Items.

This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class
Items.AssignItem

An item representing an assignment expressions.

pack-priv class
Items.CondItem

An item representing a conditional or unconditional jump.

pack-priv class
Items.DynamicItem

An item representing a dynamic call site.

pack-priv class
Items.ImmediateItem

An item representing a literal.

pack-priv class
Items.IndexedItem

An item representing an indexed expression.

pack-priv abstract class
Items.Item

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

pack-priv class
Items.LocalItem

An item representing a local variable.

pack-priv class
Items.MemberItem

An item representing an instance variable or method.

pack-priv class
Items.SelfItem

An item representing `this' or `super'.

pack-priv class
Items.StackItem

An item representing a value on stack.

pack-priv class
Items.StaticItem

An item representing a static variable or method.

Field Summary

Modifier and TypeField and Description
pack-priv Code
code

The current code buffer.

pack-priv PoolWriter
poolWriter

The current constant pool writer.

private final Items.Item[]
private final Items.Item
pack-priv Symtab
syms

The current symbol table.

private final Items.Item
pack-priv Types
types

Type utilities.

private final Items.Item
voidItem

Items that exist only once (flyweight pattern).

Constructor Summary

AccessConstructor and Description
public
Items(PoolWriter poolWriter, Code code, Symtab syms, Types types)

Method Summary

Modifier and TypeMethod and Description
pack-priv Items.Item
makeAssignItem(Items.Item
The item representing the assignment's left hand side.
lhs
)

Make an item representing an assignment expression.

pack-priv Items.CondItem
makeCondItem(int
The jump's opcode.
opcode
,
Code.Chain
A chain encompassing all jumps that can be taken if the condition evaluates to true.
trueJumps
,
Code.Chain
A chain encompassing all jumps that can be taken if the condition evaluates to false.
falseJumps
)

Make an item representing a conditional or unconditional jump.

pack-priv Items.CondItem
makeCondItem(int
The jump's opcode.
opcode
)

Make an item representing a conditional or unconditional jump.

pack-priv Items.Item
makeDynamicItem(Symbol
The represented symbol.
member
)

Make an item representing a dynamically invoked method.

pack-priv Items.Item
makeImmediateItem(Type
The literal's type.
type
,
Object
The literal's value.
value
)

Make an item representing a literal.

pack-priv Items.Item
makeIndexedItem(Type
The expression's type.
type
)

Make an item representing an indexed expression.

pack-priv Items.LocalItem
makeLocalItem(Symbol.VarSymbol
The represented variable.
v
)

Make an item representing a local variable.

private Items.LocalItem
makeLocalItem(Type
The represented variable's type.
type
,
int
The represented variable's register.
reg
)

Make an item representing a local anonymous variable.

pack-priv Items.Item
makeMemberItem(Symbol
The represented symbol.
member
,
boolean
Is the reference not virtual? (true for constructors and private members).
nonvirtual
)

Make an item representing an instance variable or method.

pack-priv Items.Item
makeStackItem(Type
The value's type.
type
)

Make an item representing a value on stack.

pack-priv Items.Item
makeStaticItem(Symbol
The represented symbol.
member
)

Make an item representing a static variable or method.

pack-priv Items.Item
makeSuperItem()

Make an item representing `super'.

pack-priv Items.Item
makeThisItem()

Make an item representing `this'.

pack-priv Items.Item
makeVoidItem()

Make a void item

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait