Follow the links below to browse sample Javadoc for MJ classes and tools, including the MJ Runtime Library.

 

Package: com.arsi.mj.maprpt.lexer.symtab.vartype  previous next contents

Package com.arsi.mj.maprpt.lexer.symtab.vartype contains the following classes and interfaces.
Classes and Interfaces
ISupportsVariableTypeVoting Defines mechanism for target parse node (or other object) to vote for type of variables based on context known by node (e.g., assignment of a string or numeric literal, usage with DC statement).
VarTypeVoteBase Abstract base class that represents a vote for the type of a variable.
VarTypeVotePeekData Represents a vote for type of a variable where the type or value of data (e.g., column) from a report or result must be "peeked at" to properly determine the type of the target variable.
VarTypeVotePeekVariable Represents a vote for type of a variable where the type or value of another variable (or variables, for example, a binary operation) must be "peeked at" to properly determine the type of the target variable.
VarTypeVoteStatic Represents a vote for type of a variable where all information is available at compile-time, i.e., just from parsing a RUN command.

Interface: ISupportsVariableTypeVoting   next package

Defines mechanism for target parse node (or other object) to vote for type of variables based on context known by node (e.g., assignment of a string or numeric literal, usage with DC statement).
public interface com.arsi.mj.maprpt.lexer.symtab.vartype.ISupportsVariableTypeVoting
Methods
Gather variable type votes based on context known by parse node (or other object).
Returns:
list of variable type votes.
public java.util.List voteForVariableTypes()

Class: VarTypeVoteBase   previous next package

Abstract base class that represents a vote for the type of a variable.
public abstract class com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase
  extends java.lang.Object
Inner Class Reason
Enumerates reasons why voting for specified variable type.
public static final class com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.Reason
  extends java.lang.Enum
public static final com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.Reason ASSIGNMENT
public static final com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.Reason COMPARE
public static final com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.Reason DATE
public static final com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.Reason DATETIME
public static final com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.Reason DECLARATION
public static final com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.Reason FORMAT
public static final com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.Reason FUNCTION
public static final com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.Reason INTEGER_MATH
public static final com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.Reason MATH
public static final com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.Reason TIME
public static com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.Reason valueOf(java.lang.String name)
public static com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.Reason values()
Inner Class VarTypeVoteIdentity
Nested class that represents identity of variable being voted upon.
public static class com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.VarTypeVoteIdentity
  extends com.arsi.mj.maprpt.lexer.symtab.VariableIdentity
Specifies if variable is scalar or array.
public final com.arsi.mj.maprpt.lexer.symtab.VarArrayType arrayOrScalar

Public ctor for initializing an instance of this class.
Parameters:
anIdentity - identity of variable.
anArrayType - specifies if variable is scalar or array.
public VarTypeVoteBase.VarTypeVoteIdentity(com.arsi.mj.maprpt.lexer.symtab.VariableIdentity anIdentity, com.arsi.mj.maprpt.lexer.symtab.VarArrayType anArrayType)
Public ctor for initializing an instance of this class.
Parameters:
anIdentType - identifies variable as named or numbered.
anArrayType - specifies if variable is scalar or array.
anIdentValue - name (String) or number (Integer) of variable.
aScope - scope of variable.
public VarTypeVoteBase.VarTypeVoteIdentity(com.arsi.mj.maprpt.lexer.symtab.VarIdentType anIdentType, com.arsi.mj.maprpt.lexer.symtab.VarArrayType anArrayType, java.lang.Object anIdentValue, com.arsi.mj.VariableScope aScope)
public boolean equals(java.lang.Object anObject)
public int hashCode()
Get canonical variable identity for comparing to other identities in symbol table.
Returns:
canonical variable identity for comparison and lookup.
public com.arsi.mj.maprpt.lexer.symtab.VariableIdentity variableIdentityForSymbolTable()
Fields
Fundamental, scalar type being voted for.
protected final com.arsi.mj.datatype.MaprptDataType dataType
Node in host parse tree where vote for variable type originated, where the parse tree (and thus the node) may be of various types. For example, IParseTreeNode for Mapper RUN commands and IEquationNode for external variables in ART, DC, CHG and CAL equations.
protected final java.lang.Object hostParsedNode
Reason for voting in this particular way.
protected final com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.Reason reason
Modifies fundamental, scalar type being voted for by specifying type based on usage and context.
protected final com.arsi.mj.datatype.MaprptUsageDataType usageDataType
Identifies variable whose type is being voted upon.
protected com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.VarTypeVoteIdentity variableIdentity
Variable type being voted for as it would be specified in a Mapper RUN.
protected final com.arsi.mj.maprpt.lexer.ptree.cmd.MaprptVariableType variableType
Constructors
Restricted ctor for initializing an instance of this class.
Parameters:
aDataType - fundamental, scalar type being voted for.
usageDataType - modifies fundamental, scalar type being voted for by specifying type based on usage and context.
aVariableType - variable type being voted for as it would be specified in a Mapper RUN.
aReason - reason for voting this particular way.
aVarTypeIdent - identifies variable whose type is being voted upon.
aEqNode - equation node where vote for variable type originated.
protected VarTypeVoteBase(com.arsi.mj.datatype.MaprptDataType aDataType, com.arsi.mj.datatype.MaprptUsageDataType aUsageDataType, com.arsi.mj.maprpt.lexer.ptree.cmd.MaprptVariableType aVariableType, com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.Reason aReason, com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.VarTypeVoteIdentity aVarTypeIdent, com.arsi.mj.maprpt.lexer.ptree.cmd.equation.nodes.IEquationNode aEqNode)
Restricted ctor for initializing an instance of this class.
Parameters:
aDataType - fundamental, scalar type being voted for.
usageDataType - modifies fundamental, scalar type being voted for by specifying type based on usage and context.
aVariableType - variable type being voted for as it would be specified in a Mapper RUN.
aReason - reason for voting this particular way.
aVarTypeIdent - identifies variable whose type is being voted upon.
aPtreeNode - parse tree node where vote for variable type originated.
protected VarTypeVoteBase(com.arsi.mj.datatype.MaprptDataType aDataType, com.arsi.mj.datatype.MaprptUsageDataType aUsageDataType, com.arsi.mj.maprpt.lexer.ptree.cmd.MaprptVariableType aVariableType, com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.Reason aReason, com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.VarTypeVoteIdentity aVarTypeIdent, com.arsi.mj.maprpt.lexer.ptree.IParseTreeNode aPtreeNode)
Methods
Get fundamental, scalar type being voted for.
public com.arsi.mj.datatype.MaprptDataType dataType()
Dump textual representation of this variable type vote.
Parameters:
anOut - print stream for writing textual representation.
anIdentLevel - levels of indentation to print before lines in textual representation.
public void dump(java.io.PrintStream anOut, int anIdentLevel)
If vote for variable type originated from equation node, get the equation node.
Returns:
equation node where vote for variable type originated or NULL if none.
public com.arsi.mj.maprpt.lexer.ptree.cmd.equation.nodes.IEquationNode getEquationNode()
Get RUN parse tree node where vote for variable type originated.
Returns:
RUN parse tree node where vote for variable type originated; for example, a command parse tree node that references variable.
public com.arsi.mj.maprpt.lexer.ptree.IParseTreeNode getParseTreeNode()
Get reason for voting in this particular way.
public final com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.Reason reason()
Set identity of variable whose type is being voted upon.
public final void setVariableIdentity(com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.VarTypeVoteIdentity aVarTypeVoteIdent)
Get modifier of fundamental, scalar type being voted for that specifies type based on usage and context.
public com.arsi.mj.datatype.MaprptUsageDataType usageDataType()
Get identity of variable whose type is being voted upon.
public final com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.VarTypeVoteIdentity variableIdentity()
Get variable type being voted for as it would be specified in a Mapper RUN.
public com.arsi.mj.maprpt.lexer.ptree.cmd.MaprptVariableType variableType()

Class: VarTypeVotePeekData   previous next package

Represents a vote for type of a variable where the type or value of data (e.g., column) from a report or result must be "peeked at" to properly determine the type of the target variable.
public class com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVotePeekData
  extends com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase
Fields
Identifies report-or-result-to-peek-at.
public final com.arsi.mj.maprpt.lexer.ptree.symbol.Cdr cdr
String bounds (e.g., (4-7)) that identifies column where data resides, NULL if dataName is not NULL.
public final com.arsi.mj.maprpt.lexer.ptree.symbol.StringBounds dataBounds
Name of column (as string TextExpr or variable reference IVariableDerefExpr) that identifies column where data resides, NULL if dataBounds is not NULL.
public final com.arsi.mj.maprpt.lexer.ptree.expr.ConcatExpr dataName
Constructors
Public ctor for initializing an instance of this class.
Parameters:
aCdr - identifies report-or-result-to-peek-at.
aDataName - name of column (as string TextExpr or variable reference IVariableDerefExpr) that identifies column where data resides, NULL if position and length (bounds) identifies column instead of name.
aDataBounds - name of column (as string TextExpr or variable reference IVariableDerefExpr) that identifies column where data resides, NULL if name identifies column instead of position and length.
aReason - reason for voting this particular way.
aVarTypeVoteIdent - identifies variable whose type is being voted upon.
aEqNode - equation node where vote for variable type originated.
public VarTypeVotePeekData(com.arsi.mj.maprpt.lexer.ptree.symbol.Cdr aCdr, com.arsi.mj.maprpt.lexer.ptree.expr.ConcatExpr aDataName, com.arsi.mj.maprpt.lexer.ptree.symbol.StringBounds aDataBounds, com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.Reason aReason, com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.VarTypeVoteIdentity aVarTypeVoteIdent, com.arsi.mj.maprpt.lexer.ptree.cmd.equation.nodes.IEquationNode aEqNode)
Public ctor for initializing an instance of this class.
Parameters:
aCdr - identifies report-or-result-to-peek-at.
aDataName - name of column (as string TextExpr or variable reference IVariableDerefExpr) that identifies column where data resides, NULL if position and length (bounds) identifies column instead of name.
aDataBounds - name of column (as string TextExpr or variable reference IVariableDerefExpr) that identifies column where data resides, NULL if name identifies column instead of position and length.
aReason - reason for voting this particular way.
aVarTypeVoteIdent - identifies variable whose type is being voted upon.
aPtreeNode - parse tree node where vote for variable type originated.
public VarTypeVotePeekData(com.arsi.mj.maprpt.lexer.ptree.symbol.Cdr aCdr, com.arsi.mj.maprpt.lexer.ptree.expr.ConcatExpr aDataName, com.arsi.mj.maprpt.lexer.ptree.symbol.StringBounds aDataBounds, com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.Reason aReason, com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.VarTypeVoteIdentity aVarTypeVoteIdent, com.arsi.mj.maprpt.lexer.ptree.IParseTreeNode aPtreeNode)

Class: VarTypeVotePeekVariable   previous next package

Represents a vote for type of a variable where the type or value of another variable (or variables, for example, a binary operation) must be "peeked at" to properly determine the type of the target variable.
public class com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVotePeekVariable
  extends com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase
Fields
Identifies variables-to-peek-at for type and/or value.
public final java.util.List peekVarRefIdents
Constructors
Public ctor for initializing an instance of this class.
Parameters:
somePeekVarRefIdent - identifies variables-to-peek-at for type and/or value.
aReason - reason for voting this particular way.
aVarTypeVoteIdent - identifies variable whose type is being voted upon.
aEqNode - equation node where vote for variable type originated.
public VarTypeVotePeekVariable(java.util.Collection somePeekVarRefIdent, com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.Reason aReason, com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.VarTypeVoteIdentity aVarTypeVoteIdent, com.arsi.mj.maprpt.lexer.ptree.cmd.equation.nodes.IEquationNode aEqNode)
Public ctor for initializing an instance of this class.
Parameters:
somePeekVarRefIdent - identifies variables-to-peek-at for type and/or value.
aReason - reason for voting this particular way.
aVarTypeVoteIdent - identifies variable whose type is being voted upon.
aPtreeNode - parse tree node where vote for variable type originated.
public VarTypeVotePeekVariable(java.util.Collection somePeekVarRefIdent, com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.Reason aReason, com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.VarTypeVoteIdentity aVarTypeVoteIdent, com.arsi.mj.maprpt.lexer.ptree.IParseTreeNode aPtreeNode)
Public ctor for initializing an instance of this class.
Parameters:
aPeekVarRefIdent1 - identifies first (e.g., left-hand operand) variable-to-peek-at for type and/or value.
aPeekVarRefIdent2 - identifies second (e.g., right-hand operand) variable-to-peek-at for type and/or value.
aReason - reason for voting this particular way.
aVarTypeVoteIdent - identifies variable whose type is being voted upon.
aEqNode - equation node where vote for variable type originated.
public VarTypeVotePeekVariable(com.arsi.mj.maprpt.lexer.symtab.VariableReferenceIdentity aPeekVarRefIdent1, com.arsi.mj.maprpt.lexer.symtab.VariableReferenceIdentity aPeekVarRefIdent2, com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.Reason aReason, com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.VarTypeVoteIdentity aVarTypeVoteIdent, com.arsi.mj.maprpt.lexer.ptree.cmd.equation.nodes.IEquationNode aEqNode)
Public ctor for initializing an instance of this class.
Parameters:
aPeekVarRefIdent1 - identifies first (e.g., left-hand operand) variable-to-peek-at for type and/or value.
aPeekVarRefIdent2 - identifies second (e.g., right-hand operand) variable-to-peek-at for type and/or value.
aReason - reason for voting this particular way.
aVarTypeVoteIdent - identifies variable whose type is being voted upon.
aPtreeNode - parse tree node where vote for variable type originated.
public VarTypeVotePeekVariable(com.arsi.mj.maprpt.lexer.symtab.VariableReferenceIdentity aPeekVarRefIdent1, com.arsi.mj.maprpt.lexer.symtab.VariableReferenceIdentity aPeekVarRefIdent2, com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.Reason aReason, com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.VarTypeVoteIdentity aVarTypeVoteIdent, com.arsi.mj.maprpt.lexer.ptree.IParseTreeNode aPtreeNode)
Public ctor for initializing an instance of this class.
Parameters:
aPeekVarRefIdent - identifies a single variable-to-peek-at for type and/or value.
aReason - reason for voting this particular way.
aVarTypeVoteIdent - identifies variable whose type is being voted upon.
aEqNode - equation node where vote for variable type originated.
public VarTypeVotePeekVariable(com.arsi.mj.maprpt.lexer.symtab.VariableReferenceIdentity aPeekVarRefIdent, com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.Reason aReason, com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.VarTypeVoteIdentity aVarTypeVoteIdent, com.arsi.mj.maprpt.lexer.ptree.cmd.equation.nodes.IEquationNode aEqNode)
Public ctor for initializing an instance of this class.
Parameters:
aPeekVarRefIdent - identifies a single variable-to-peek-at for type and/or value.
aReason - reason for voting this particular way.
aVarTypeVoteIdent - identifies variable whose type is being voted upon.
aPtreeNode - parse tree node where vote for variable type originated.
public VarTypeVotePeekVariable(com.arsi.mj.maprpt.lexer.symtab.VariableReferenceIdentity aPeekVarRefIdent, com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.Reason aReason, com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.VarTypeVoteIdentity aVarTypeVoteIdent, com.arsi.mj.maprpt.lexer.ptree.IParseTreeNode aPtreeNode)
Methods
Dump textual representation of this variable type vote.
Parameters:
anOut - print stream for writing textual representation.
anIdentLevel - levels of indentation to print before lines in textual representation.
public void dump(java.io.PrintStream anOut, int anIdentLevel)

Class: VarTypeVoteStatic   previous package

Represents a vote for type of a variable where all information is available at compile-time, i.e., just from parsing a RUN command.
public class com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteStatic
  extends com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase
Constructors
Public ctor for initializing an instance of this class.
Parameters:
aDataType - fundamental, scalar type being voted for.
usageDataType - modifies fundamental, scalar type being voted for by specifying type based on usage and context.
aVariableType - variable type being voted for as it would be specified in a Mapper RUN.
aReason - reason for voting this particular way.
aVarTypeVoteIdent - identifies variable whose type is being voted upon.
aEqNode - equation node where vote for variable type originated.
public VarTypeVoteStatic(com.arsi.mj.datatype.MaprptDataType aDataType, com.arsi.mj.datatype.MaprptUsageDataType aUsageDataType, com.arsi.mj.maprpt.lexer.ptree.cmd.MaprptVariableType aVariableType, com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.Reason aReason, com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.VarTypeVoteIdentity aVarTypeVoteIdent, com.arsi.mj.maprpt.lexer.ptree.cmd.equation.nodes.IEquationNode aEqNode)
Public ctor for initializing an instance of this class.
Parameters:
aDataType - fundamental, scalar type being voted for.
usageDataType - modifies fundamental, scalar type being voted for by specifying type based on usage and context.
aVariableType - variable type being voted for as it would be specified in a Mapper RUN.
aReason - reason for voting this particular way.
aVarTypeVoteIdent - identifies variable whose type is being voted upon.
aPtreeNode - parse tree node where vote for variable type originated.
public VarTypeVoteStatic(com.arsi.mj.datatype.MaprptDataType aDataType, com.arsi.mj.datatype.MaprptUsageDataType aUsageDataType, com.arsi.mj.maprpt.lexer.ptree.cmd.MaprptVariableType aVariableType, com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.Reason aReason, com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.VarTypeVoteIdentity aVarTypeVoteIdent, com.arsi.mj.maprpt.lexer.ptree.IParseTreeNode aPtreeNode)