Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.rse.util.clprompter
Class ClExpression

java.lang.Object
  extended by com.ibm.etools.iseries.rse.util.clprompter.ClExpression

public class ClExpression
extends Object

Parses expressions into queriable components.

Since:
6.0

Field Summary
static int ARITHMATIC
           
static int CHARACTER
           
static String Copyright
           
static int LOGICAL
           
static int POINTER
           
static int RELATIONAL
           
static String VALUE
           
 
Constructor Summary
ClExpression(String expression, String kwd, boolean checkBrackets)
          One of the constructor for this class.
ClExpression(String expression, String kwd, int nestingLevel, boolean checkBrackets)
          One of the constructors for this class.
 
Method Summary
 int getNestingLevel()
          retrieves the nesting level of the expression
 Object getParsedObject()
          Returns a simplified object that represents the parsed expression, can be one of ClVariable ClBuiltInExpression ClExpression String Long
 int getType()
          Retrieves the typeof this expression
 void setNestingLevel(int level)
          Sets the nesting level for the expression
 String toString()
          returns the string representation of this expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

Copyright

public static final String Copyright
See Also:
Constant Field Values

ARITHMATIC

public static final int ARITHMATIC
See Also:
Constant Field Values

LOGICAL

public static final int LOGICAL
See Also:
Constant Field Values

CHARACTER

public static final int CHARACTER
See Also:
Constant Field Values

RELATIONAL

public static final int RELATIONAL
See Also:
Constant Field Values

POINTER

public static final int POINTER
See Also:
Constant Field Values

VALUE

public static final String VALUE
See Also:
Constant Field Values
Constructor Detail

ClExpression

public ClExpression(String expression,
                    String kwd,
                    boolean checkBrackets)
             throws ClParseException,
                    ClSyntaxException
One of the constructor for this class.

Parameters:
expression - the expression to parse.
kwd - The parameter keyword that this expression belongs to (used in error messages)
checkBrackets - Whether or not outer brackets should be enforced.
Throws:
ClParseException - This exception is thrown if the value specified isn't an expression
ClSyntaxException - This exception is thrown if the expression specified has a syntax error.

ClExpression

public ClExpression(String expression,
                    String kwd,
                    int nestingLevel,
                    boolean checkBrackets)
             throws ClParseException,
                    ClSyntaxException
One of the constructors for this class.

Parameters:
expression - the expression to parse.
kwd - The parameter keyword that this expression belongs to (used in error messages)
nestingLevel - The nesting level of the expression.
checkBrackets - Whether or not outer brackets should be enforced.
Throws:
ClParseException - This exception is thrown if the value specified isn't an expression
ClSyntaxException - This exception is thrown if the expression specified has a syntax error.
Method Detail

getParsedObject

public Object getParsedObject()
Returns a simplified object that represents the parsed expression, can be one of

Returns:
the object represented by this expression.

toString

public String toString()
returns the string representation of this expression.

Overrides:
toString in class Object

getType

public int getType()
Retrieves the typeof this expression

Returns:
One of: ARITHMATIC,CHARACTER,RELATIONAL,LOGICAL

getNestingLevel

public int getNestingLevel()
retrieves the nesting level of the expression

Returns:
the nesting level (1-5)

setNestingLevel

public void setNestingLevel(int level)
Sets the nesting level for the expression


Rational Developer for Power Systems Software
V7.6

Copyright 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.