public class ArrayDeclaration extends TypeDeclaration implements ArrayType
ArrayType. As the only attribute of
 an array has been the length attribute, it has been handled in a
 different way than members of usual classes. As we need some implicit
 fields for array creation and initialisation, the special handling of
 arrays is not any longer practicable. 
  So, this class introduce a 'virtual' declaration for array types
 containing all required members. Please not the array fields accessed
 by an index are not included, so arrays of different lengths with same base
 type belong to the same array declaration.
 Attention: In contrast to the other type declaration, array
 declarations may be added at runtime.| Modifier and Type | Field and Description | 
|---|---|
private java.lang.String | 
altNameRepresentation  | 
private TypeReference | 
basetype
reference to the type the elements of this array must subclass 
 | 
private int | 
dim
dimension of the array 
 | 
private KeYJavaType | 
superType  | 
fullName, isLibrary, members, name, parentIsInterfaceDeclarationmodArray| Modifier | Constructor and Description | 
|---|---|
  | 
ArrayDeclaration(ExtList children,
                TypeReference baseType,
                KeYJavaType superType)
ArrayDeclaration 
 | 
private  | 
ArrayDeclaration(ExtList children,
                TypeReference baseType,
                ProgramElementName name,
                KeYJavaType superType)  | 
| Modifier and Type | Method and Description | 
|---|---|
private static ExtList | 
addLength(ExtList children,
         KeYJavaType superType)  | 
static ProgramElementName | 
createName(TypeReference basetype)  | 
private int | 
dimension()
computes the dimension of this array 
 | 
java.lang.String | 
getAlternativeNameRepresentation()
full name of the array in alternative form, i.e. 
 | 
TypeReference | 
getBaseType()
Get the element/base type. 
 | 
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. 
 | 
Literal | 
getDefaultValue()
returns the default value of the given type 
 according to JLS Sect. 4.5.5 
 | 
int | 
getDimension()
return the dimension of this array 
 | 
ImmutableList<KeYJavaType> | 
getSupertypes()
returns the local declared supertypes 
 | 
boolean | 
isInterface()
Arrays are never interfaces (but may have interface types as
 element types) 
 | 
boolean | 
isStrictFp()
Arrays are never strictfp. 
 | 
boolean | 
isTransient()
Arrays are never transient. 
 | 
boolean | 
isVolatile()
Arrays are never volatile. 
 | 
FieldDeclaration | 
length()  | 
void | 
prettyPrint(PrettyPrinter p)
pretty prints an array declaration 
 | 
java.lang.String | 
toString()
toString 
 | 
void | 
visit(Visitor v)
calls the corresponding method of a visitor in order to
 perform some action/transformation on this element 
 | 
equals, getAllFields, getAllMethods, getAllSupertypes, getAllTypes, getConstructors, getFields, getFirstElement, getFullName, getLastElement, getMembers, getMethods, getName, getPackage, getProgramElementName, getTypeDeclarationAt, getTypeDeclarationCount, getTypes, isAbstract, isFinal, isLibraryClass, isPrivate, isProtected, isPublic, isStaticgetModifiers, getStateCount, getVisibilityModifier, isGhost, isModel, isNative, isSynchronizedcompatibleBlockSize, computeHashCode, equalsModRenaming, getArrayPos, match, matchChildrengetComments, hashCode, prettyPrintMain, reuseSignaturegetEndPosition, getFirstElementIncludingBlocks, getParentClass, getPositionInfo, getRelativePosition, getStartPosition, setParentClass, toSource, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetFullName, getNamegetModifiersgetComments, matchequalsModRenaming, getEndPosition, getFirstElementIncludingBlocks, getPositionInfo, getRelativePosition, getStartPositionprivate final TypeReference basetype
private final int dim
private final KeYJavaType superType
private java.lang.String altNameRepresentation
private ArrayDeclaration(ExtList children, TypeReference baseType, ProgramElementName name, KeYJavaType superType)
public ArrayDeclaration(ExtList children, TypeReference baseType, KeYJavaType superType)
children - an ExtList with the basetype and member
 declarations of this typeprivate static ExtList addLength(ExtList children, KeYJavaType superType)
public int getChildCount()
getChildCount in interface NonTerminalProgramElementpublic FieldDeclaration length()
public ProgramElement getChildAt(int index)
getChildAt in interface NonTerminalProgramElementindex - an index into this node's "virtual" child arrayjava.lang.ArrayIndexOutOfBoundsException - if index is out
    of boundspublic TypeReference getBaseType()
getBaseType in interface ArrayTypepublic boolean isStrictFp()
isStrictFp in interface MemberisStrictFp in interface MemberDeclarationisStrictFp in class TypeDeclarationtrue if this member is strictfp,
       false otherwise.public boolean isTransient()
isTransient in class JavaDeclarationpublic boolean isVolatile()
isVolatile in class JavaDeclarationpublic boolean isInterface()
isInterface in interface ClassTypetrue if this object represents an interface,
       false if it is an ordinary class.public int getDimension()
getDimension in interface ArrayTypepublic Literal getDefaultValue()
getDefaultValue in interface TypegetDefaultValue in class TypeDeclarationprivate int dimension()
public static ProgramElementName createName(TypeReference basetype)
public java.lang.String getAlternativeNameRepresentation()
ArrayTypeint[] instead of [IgetAlternativeNameRepresentation in interface ArrayTypepublic ImmutableList<KeYJavaType> getSupertypes()
getSupertypes in interface ClassTypegetSupertypes in class TypeDeclarationpublic void visit(Visitor v)
visit in interface SourceElementv - the Visitorpublic void prettyPrint(PrettyPrinter p) throws java.io.IOException
prettyPrint in interface SourceElementprettyPrint in class JavaProgramElementp - a pretty printer.java.io.IOException - occasionally thrown.public java.lang.String toString()
toString in class JavaSourceElement