com.pega.pegarules.pub.generator
Interface Expression

All Known Subinterfaces:
StringExpression

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:

Instances of these interfaces are supplied by methods of the FirstUseAssembler interface.

Version:
$Revision: 31 $ $Date: 2009-06-24 09:38:04 -0400 (Wed, 24 Jun 2009) $
Author:
John van der Meer

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

COPYRIGHT

static final java.lang.String COPYRIGHT
See Also:
Constant Field Values

VERSION

static final java.lang.String VERSION
See Also:
Constant Field Values

EXPR_STRING

static final byte EXPR_STRING
The value of the expression is a java.lang.String.

See Also:
Constant Field Values

EXPR_BOOLEAN

static final byte EXPR_BOOLEAN
The value of the expression is a boolean.

See Also:
Constant Field Values

EXPR_INTEGER

static final byte EXPR_INTEGER
The value of the expression is an int.

See Also:
Constant Field Values

EXPR_PROPERTY

static final byte EXPR_PROPERTY
The value of the expression is a ClipboardProperty.

See Also:
Constant Field Values
Method Detail

getType

byte getType()
Identifies the value type represented by this instance.

Returns:
One of the EXPR_* values, representing the value type of the expression.

addExpression

void addExpression(boolean aToPrimary,
                   boolean aClosed)
Adds a Java representation of this expression to the code being generated.

Parameters:
aToPrimary - true if code should be added to the Primary Code path; false if it should be added to the Support Code
aClosed - 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 expression

isLiteral

boolean isLiteral()
Indicates whether the value of this expression is known at assembly time.

Returns:
true if this value is known at assembly time; false if the value requires runtime evaluation
See Also:
isExpression()

isExpression

boolean isExpression()
Indicates whether the value of this expression depends on information that is only available at runtime.

Returns:
true if this value requires runtime evaluation; false if the value is known at assembly time
See Also:
isLiteral()


Copyright © 2012 Pegasystems Inc. All Rights Reserved.