|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Expression
The Expression
interface is the basis for identifying values
that are encountered during Java generation. Both compile time literals and
expressions to be evaluated at run time can be represented.
Actual instances of Expression
implement interfaces that extend
it, specific to the value type represented. In addition to the methods
described here, these extending interfaces should also define:
to
TypeName method that returns the value
identified by the expression when isLiteral()
returns
true
FirstUseAssembler
interface.
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT
|
static byte |
EXPR_BOOLEAN
The value of the expression is a boolean . |
static byte |
EXPR_INTEGER
The value of the expression is an int . |
static byte |
EXPR_PROPERTY
The value of the expression is a ClipboardProperty . |
static byte |
EXPR_STRING
The value of the expression is a java.lang.String . |
static java.lang.String |
VERSION
|
Method Summary | |
---|---|
void |
addExpression(boolean aToPrimary,
boolean aClosed)
Adds a Java representation of this expression to the code being generated. |
byte |
getType()
Identifies the value type represented by this instance. |
boolean |
isExpression()
Indicates whether the value of this expression depends on information that is only available at runtime. |
boolean |
isLiteral()
Indicates whether the value of this expression is known at assembly time. |
Field Detail |
---|
static final java.lang.String COPYRIGHT
static final java.lang.String VERSION
static final byte EXPR_STRING
java.lang.String
.
static final byte EXPR_BOOLEAN
boolean
.
static final byte EXPR_INTEGER
int
.
static final byte EXPR_PROPERTY
ClipboardProperty
.
Method Detail |
---|
byte getType()
EXPR_
* values, representing the value
type of the expression.void addExpression(boolean aToPrimary, boolean aClosed)
aToPrimary
- true
if code should be added to the
Primary Code path; false
if it should be added to the
Support CodeaClosed
- true
if the code must be syntactically
distinct (because it is being used as part of a larger expression);
false
if the context establishes the distinctness of the
expressionboolean isLiteral()
true
if this value is known at assembly time;
false
if the value requires runtime evaluationisExpression()
boolean isExpression()
true
if this value requires runtime evaluation;
false
if the value is known at assembly timeisLiteral()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |