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  previous next contents

Package com.arsi.mj.maprpt.lexer.symtab contains the following classes and interfaces.
Classes and Interfaces
ISupportsVariableReference Defines mechanism for target parse node (or other object) to list variable references, but not variable declarations (see ISupportsScalarDeclaration and ISupportsArrayDeclaration instead).
ISymbolTable Defines a simple mechanism for storing and manipulating symbol table entries.
ISymbolTableEntry Marker interface that denotes the implementing class is a symbol table entry.
ISymbolTableVariable Define symbol table entry for a variable or array.
SymbolTableIdentifier Stores canonical identifier (i.e., unique Java identifier) for symbol table variable.
SymbolTableVariableBase Abstract base class for symbol table variable entries.
VarArrayType Qualifies variable identity as array or scalar.
VariableIdentity Represents identity of variable.
VariableReferenceIdentity Represents identity of variable referenced in a Mapper RUN statement.
VarIdentType Defines variable identity as name or number.

Interface: ISupportsVariableReference   next package

Defines mechanism for target parse node (or other object) to list variable references, but not variable declarations (see ISupportsScalarDeclaration and ISupportsArrayDeclaration instead).
public interface com.arsi.mj.maprpt.lexer.symtab.ISupportsVariableReference
Methods
Enumerate all variables referenced (not declared) by parse node (or other object).
Returns:
list of variable reference information.
public java.util.List referencedVariables()

Interface: ISymbolTable   previous next package

Defines a simple mechanism for storing and manipulating symbol table entries.
public interface com.arsi.mj.maprpt.lexer.symtab.ISymbolTable
Methods
Declare or re-define variable in symbol table.
Parameters:
aVariable - variable to declare or re-define.
public void declareVariable(com.arsi.mj.maprpt.lexer.symtab.ISymbolTableVariable aVariable)
Note that specified parse tree node references the specified variable.
Parameters:
aVarIdent - identifies the referenced variable.
aPtreeNode - parse tree node that references the variable.
public void referenceVariable(com.arsi.mj.maprpt.lexer.symtab.VariableReferenceIdentity aVarIdent, com.arsi.mj.maprpt.lexer.ptree.IParseTreeNode aPtreeNode)
Cast votes for type of variable represented by this symbol table entry after discovery of variable declarations and references.
Parameters:
aVarIdent - identifies the referenced variable.
aVote - variable type vote.
public boolean voteForVariableType(com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.VarTypeVoteIdentity aVarIdent, com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase aVote)

Interface: ISymbolTableEntry   previous next package

Marker interface that denotes the implementing class is a symbol table entry.
public interface com.arsi.mj.maprpt.lexer.symtab.ISymbolTableEntry

Interface: ISymbolTableVariable   previous next package

Define symbol table entry for a variable or array.
public interface com.arsi.mj.maprpt.lexer.symtab.ISymbolTableVariable
  extends com.arsi.mj.maprpt.lexer.symtab.ISymbolTableEntry
Methods
Get parse tree nodes that declare or re-define variable.
Returns:
parse tree nodes, concrete class expected to be CommandParseNode.
public java.util.Set declarationParseTreeNodes()
Get fundamental, scalar type of variable, may be more than one if variable redefined or variable contains different type of data from the declared type.
public java.util.Set getDataTypes()
Get unique Java identifier of variable, if known at the time (usually requires post processing of symbol table).
public com.arsi.mj.maprpt.lexer.symtab.SymbolTableIdentifier getJavaIdentifier()
Get Mapper identity of variable: name or number and scope.
public com.arsi.mj.maprpt.lexer.symtab.VariableIdentity getMapperIdentity()
Get variable type as it would be specified in a Mapper RUN, may be more than one if variable redefined or variable contains different type of data from the declared type.
public java.util.Set getVariableTypes()
Is this variable an array?
public boolean isArray()
Get parse tree nodes that reference variable but do not declare or re-define it.
Returns:
parse tree nodes, concrete class expected to be CommandParseNode.
public java.util.Set referenceParseTreeNodes()

Class: SymbolTableIdentifier   previous next package

Stores canonical identifier (i.e., unique Java identifier) for symbol table variable.
public class com.arsi.mj.maprpt.lexer.symtab.SymbolTableIdentifier
  extends java.lang.Object
Inner Class IdentifierSource
Specifies the custom source (identifier not generated as default from Mapper variable name or number) of the identifier , e.g., PRAGMA.
public static class com.arsi.mj.maprpt.lexer.symtab.SymbolTableIdentifier.IdentifierSource
  extends java.lang.Object
Cabinet, drawer and report where pragma is located, or specifies cabinet, drawer and report that corresponds to Spring configuration file where identifier was resolved.
public final com.arsi.mj.maprpt.namedrpt.NamedReportLookup.CDRCoordinate cdr

Host at-line where pragma is located, NULL if configured.
public final com.arsi.mj.maprpt.parser.line.types.AtLine hostLine

Custom source of the identifier.
public final com.arsi.mj.maprpt.lexer.symtab.SymbolTableIdentifier.IdentifierSource.SourceType sourceType

Public ctor for initializing an instance of this class where source is configuration.
Parameters:
aCDR - specifies cabinet, drawer and report that corresponds to Spring configuration file where identifier was resolved.
public SymbolTableIdentifier.IdentifierSource(com.arsi.mj.maprpt.namedrpt.NamedReportLookup.CDRCoordinate aCDR)
Public ctor for initializing an instance of this class where source is pragma.
Parameters:
aCDR - cabinet, drawer and report where pragma is located.
aHostLine - host at-line where pragma is located.
public SymbolTableIdentifier.IdentifierSource(com.arsi.mj.maprpt.namedrpt.NamedReportLookup.CDRCoordinate aCDR, com.arsi.mj.maprpt.parser.line.types.AtLine aHostLine)
Fields
Specifies the source of the identifier (NULL if default, generated Java identifier).
public final com.arsi.mj.maprpt.lexer.symtab.SymbolTableIdentifier.IdentifierSource identifierSource
The Java identifier for the variable.
public final java.lang.String javaIdentifier
Constructors
Public ctor for initializing an instance of this class for default, generated identifiers.
Parameters:
aJavaIdent - Java identifier for variable.
public SymbolTableIdentifier(java.lang.String aJavaIdent)
Public ctor for initializing an instance of this class for custom identifiers.
Parameters:
aJavaIdent - Java identifier for variable.
anIdentSource - specifies the source of the identifier (NULL if default, generated Java identifier).
public SymbolTableIdentifier(java.lang.String aJavaIdent, com.arsi.mj.maprpt.lexer.symtab.SymbolTableIdentifier.IdentifierSource anIdentSource)

Class: SymbolTableVariableBase   previous next package

Abstract base class for symbol table variable entries.
public abstract class com.arsi.mj.maprpt.lexer.symtab.SymbolTableVariableBase
  extends java.lang.Object
  implements com.arsi.mj.maprpt.lexer.symtab.ISymbolTableVariable
Constructors
Restricted ctor for initializing an instance of this class.
Parameters:
aVarIdent - identity of variable: name or number and scope.
anArrayFlag - true if variable is an array, false if scalar.
protected SymbolTableVariableBase(com.arsi.mj.maprpt.lexer.symtab.VariableIdentity aVarIdent, boolean anArrayFlag)
Methods
public java.util.Set declarationParseTreeNodes()
public boolean equals(java.lang.Object anObject)
public java.util.Set getDataTypes()
public com.arsi.mj.maprpt.lexer.symtab.SymbolTableIdentifier getJavaIdentifier()
public com.arsi.mj.maprpt.lexer.symtab.VariableIdentity getMapperIdentity()
public java.util.Set getVariableTypes()
public int hashCode()
public boolean isArray()
public java.util.Set referenceParseTreeNodes()
Set canonical identifier (i.e., unique Java identifier) of variable.
Parameters:
anIndentifier - canonical identifier of variable.
public void setJavaIdentifier(com.arsi.mj.maprpt.lexer.symtab.SymbolTableIdentifier anIndentifier)

Class: VarArrayType   previous next package

Qualifies variable identity as array or scalar.
public final class com.arsi.mj.maprpt.lexer.symtab.VarArrayType
  extends java.lang.Enum
Fields
public static final com.arsi.mj.maprpt.lexer.symtab.VarArrayType ARRAY
public static final com.arsi.mj.maprpt.lexer.symtab.VarArrayType ELEMENT
public static final com.arsi.mj.maprpt.lexer.symtab.VarArrayType SCALAR
Methods
public static com.arsi.mj.maprpt.lexer.symtab.VarArrayType valueOf(java.lang.String name)
public static com.arsi.mj.maprpt.lexer.symtab.VarArrayType values()

Class: VariableIdentity   previous next package

Represents identity of variable.
public class com.arsi.mj.maprpt.lexer.symtab.VariableIdentity
  extends java.lang.Object
Fields
Identifies variable as named or numbered.
public final com.arsi.mj.maprpt.lexer.symtab.VarIdentType identityType
Name (String) or number (Integer) of variable.
public final java.lang.Object identityValue
Scope of variable.
public final com.arsi.mj.VariableScope scope
Constructors
Restricted ctor for initializing an instance of this class.
Parameters:
anIdentType - identifies variable as named or numbered.
anIdentValue - name (String) or number (Integer) of variable.
aScope - scope of variable.
public VariableIdentity(com.arsi.mj.maprpt.lexer.symtab.VarIdentType anIdentType, java.lang.Object anIdentValue, com.arsi.mj.VariableScope aScope)
Methods
public boolean equals(java.lang.Object anObject)
public int hashCode()
Does variable identity indicate this is an equation function?
Returns:
true if variable is actually an equation function, false if RUN variable or internal variable.
public boolean isFunction()
Does variable identity indicate this is a variable internal to an equation?
Returns:
true if variable is internal to an equation, false if RUN variable or equation function.
public boolean isInternalVariable()
Does variable identity indicate this is a RUN variable, and not an internal variable or function from an equation?
Returns:
true if variable is RUN variable, false if internal variable or equation function.
public boolean isRunVariable()
Make name for equation functions that can appear as variables such that name distinguishes function from RUN variables.
Parameters:
aSimpleFunction - a simple function name.
Returns:
name that distinguishes equation functions from RUN variables.
public static java.lang.String makeFunctionName(java.lang.String aSimpleFunction)
Make name for variables internal to equations that distinguishes name from RUN variables.
Parameters:
aSimpleVariable - a simple variable name.
Returns:
name that distinguishes internal variables from RUN variables.
public static java.lang.String makeInternalVariableName(java.lang.String aSimpleVariable)
Convert variable identity to something that resembles Mapper source string.
Returns:
variable identity as something like a Mapper source string.
public java.lang.String toMapperString()

Class: VariableReferenceIdentity   previous next package

Represents identity of variable referenced in a Mapper RUN statement.
public class com.arsi.mj.maprpt.lexer.symtab.VariableReferenceIdentity
  extends com.arsi.mj.maprpt.lexer.symtab.VariableIdentity
Fields
Specifies if variable is scalar or array.
public final com.arsi.mj.maprpt.lexer.symtab.VarArrayType arrayOrScalar
Actual expression that is reference to variable (NULL if variable internal to equation).
public final com.arsi.mj.maprpt.lexer.ptree.expr.IVariableDerefExpr variableExpr
Constructors
Public ctor for initializing an instance of this class.
Parameters:
anArrayType - specifies if variable is scalar or array.
aVarExpr - expression that is reference to variable.
anIdentity - identity of variable.
public VariableReferenceIdentity(com.arsi.mj.maprpt.lexer.symtab.VarArrayType anArrayType, com.arsi.mj.maprpt.lexer.ptree.expr.IVariableDerefExpr aVarExpr, com.arsi.mj.maprpt.lexer.symtab.VariableIdentity anIdentity)
Public ctor for initializing an instance of this class.
Parameters:
anArrayType - specifies if variable is scalar or array.
aVarExpr - expression that is reference to variable.
anIdentType - identifies variable as named or numbered.
anIdentValue - name (String) or number (Integer) of variable.
aScope - scope of variable.
public VariableReferenceIdentity(com.arsi.mj.maprpt.lexer.symtab.VarArrayType anArrayType, com.arsi.mj.maprpt.lexer.ptree.expr.IVariableDerefExpr aVarExpr, com.arsi.mj.maprpt.lexer.symtab.VarIdentType anIdentType, java.lang.Object anIdentValue, com.arsi.mj.VariableScope aScope)
Methods
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()

Class: VarIdentType   previous package

Defines variable identity as name or number.
public final class com.arsi.mj.maprpt.lexer.symtab.VarIdentType
  extends java.lang.Enum
Fields
public static final com.arsi.mj.maprpt.lexer.symtab.VarIdentType NAME
public static final com.arsi.mj.maprpt.lexer.symtab.VarIdentType NUMBER
Methods
public static com.arsi.mj.maprpt.lexer.symtab.VarIdentType valueOf(java.lang.String name)
public static com.arsi.mj.maprpt.lexer.symtab.VarIdentType values()