public class VariableSpecification extends JavaNonTerminalProgramElement implements NamedProgramElement, ExpressionContainer, Variable
VariableDeclaration and does not
    contain a type reference or own modifiers. Note that calls to modifiers
    are delegated to the enclosing variable declaration and are therefore
    discouraged. This was necessary to subtype Declaration as analyses are
    interested in the exact location of a variable name.| Modifier and Type | Field and Description | 
|---|---|
protected int | 
dimensions
Dimensions. 
 | 
protected Expression | 
initializer
Initializer. 
 | 
protected Type | 
type
the type 
 | 
protected IProgramVariable | 
var  | 
| Constructor and Description | 
|---|
VariableSpecification()  | 
VariableSpecification(ExtList children,
                     IProgramVariable var,
                     int dim,
                     Type type)
Constructor for the transformation of RECODER ASTs to KeY. 
 | 
VariableSpecification(IProgramVariable var)  | 
VariableSpecification(IProgramVariable var,
                     Expression init,
                     Type type)  | 
VariableSpecification(IProgramVariable var,
                     int dim,
                     Expression init,
                     Type type)  | 
VariableSpecification(IProgramVariable var,
                     int dim,
                     Expression init,
                     Type type,
                     PositionInfo pi)  | 
VariableSpecification(IProgramVariable var,
                     Type type)  | 
| Modifier and Type | Method and Description | 
|---|---|
protected int | 
computeHashCode()  | 
boolean | 
equals(java.lang.Object o)  | 
boolean | 
equalsModRenaming(SourceElement se,
                 NameAbstractionTable nat)
equals modulo renaming is described in the corresponding
 comment in class SourceElement. 
 | 
ProgramElement | 
getChildAt(int index)
Returns the child at the specified index in this node's "virtual"
      child array 
 | 
int | 
getChildCount()
Returns the number of children of this node. 
 | 
int | 
getDimensions()
Get dimensions. 
 | 
Expression | 
getExpressionAt(int index)  | 
int | 
getExpressionCount()
Get the number of expressions in this container. 
 | 
SourceElement | 
getFirstElement()
Finds the source element that occurs first in the source. 
 | 
java.lang.String | 
getFullName()
Returns the maximal expanded name including all applicable
       qualifiers. 
 | 
Expression | 
getInitializer()
Get initializer. 
 | 
SourceElement | 
getLastElement()
Finds the source element that occurs last in the source. 
 | 
java.lang.String | 
getName()
Get name. 
 | 
ProgramElementName | 
getProgramElementName()
Get name. 
 | 
IProgramVariable | 
getProgramVariable()
Get program variable 
 | 
Type | 
getType()
Returns the type of this variable. 
 | 
boolean | 
hasInitializer()  | 
boolean | 
isFinal()
Checks if this variable is final. 
 | 
MatchConditions | 
match(SourceData source,
     MatchConditions matchCond)
matches the source "text" (@link SourceData#getSource()) against the pattern represented 
 by this object. 
 | 
void | 
prettyPrint(PrettyPrinter p)
Pretty printing the source element. 
 | 
void | 
visit(Visitor v)
calls the corresponding method of a visitor in order to
 perform some action/transformation on this element 
 | 
compatibleBlockSize, getArrayPos, matchChildrengetComments, hashCode, prettyPrintMain, reuseSignaturegetEndPosition, getFirstElementIncludingBlocks, getParentClass, getPositionInfo, getRelativePosition, getStartPosition, setParentClass, toSource, toString, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetCommentsgetEndPosition, getFirstElementIncludingBlocks, getPositionInfo, getRelativePosition, getStartPositionprotected final Expression initializer
protected final int dimensions
protected final Type type
protected final IProgramVariable var
public VariableSpecification()
public VariableSpecification(IProgramVariable var)
public VariableSpecification(IProgramVariable var, Type type)
public VariableSpecification(IProgramVariable var, Expression init, Type type)
public VariableSpecification(IProgramVariable var, int dim, Expression init, Type type)
public VariableSpecification(IProgramVariable var, int dim, Expression init, Type type, PositionInfo pi)
public VariableSpecification(ExtList children, IProgramVariable var, int dim, Type type)
children - the children of this AST element as KeY classes.
        May contain:
                an Expression (as initializer of the variable)
                a Commentdim - the dimension of this typepublic int getChildCount()
getChildCount in interface NonTerminalProgramElementpublic ProgramElement getChildAt(int index)
getChildAt in interface NonTerminalProgramElementindex - an index into this node's "virtual" child arrayjava.lang.ArrayIndexOutOfBoundsException - if index is out
                 of boundsprotected int computeHashCode()
computeHashCode in class JavaNonTerminalProgramElementpublic int getExpressionCount()
getExpressionCount in interface ExpressionContainerpublic Expression getExpressionAt(int index)
getExpressionAt in interface ExpressionContainerpublic final java.lang.String getName()
getName in interface NamedModelElementpublic ProgramElementName getProgramElementName()
getProgramElementName in interface NamedProgramElementpublic IProgramVariable getProgramVariable()
public int getDimensions()
public Expression getInitializer()
public boolean hasInitializer()
public boolean isFinal()
Variablepublic Type getType()
Variablepublic java.lang.String getFullName()
ProgramModelElementgetFullName in interface ProgramModelElementpublic SourceElement getFirstElement()
JavaSourceElementgetFirstElement in interface SourceElementgetFirstElement in class JavaSourceElementJavaSourceElement.toSource(), 
JavaSourceElement.getStartPosition()public SourceElement getLastElement()
JavaSourceElementgetLastElement in interface SourceElementgetLastElement in class JavaSourceElementJavaSourceElement.toSource(), 
JavaSourceElement.getEndPosition()public void visit(Visitor v)
visit in interface SourceElementv - the Visitorpublic void prettyPrint(PrettyPrinter p) throws java.io.IOException
JavaSourceElementprettyPrint in interface SourceElementprettyPrint in class JavaProgramElementp - a pretty printer.java.io.IOException - occasionally thrown.public boolean equalsModRenaming(SourceElement se, NameAbstractionTable nat)
equalsModRenaming in interface SourceElementequalsModRenaming in class JavaNonTerminalProgramElementpublic boolean equals(java.lang.Object o)
equals in class JavaNonTerminalProgramElementpublic MatchConditions match(SourceData source, MatchConditions matchCond)
ProgramElementMatchConditions with 
 the found instantiations of the schemavariables. If the match 
 failed, null is returned instead.match in interface ProgramElementmatch in class JavaNonTerminalProgramElementsource - the SourceData with the program element to matchmatchCond - the MatchConditions found up to this point