|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.javalanglevels.Data
edu.rice.cs.javalanglevels.TypeData
edu.rice.cs.javalanglevels.SymbolData
edu.rice.cs.javalanglevels.ArrayData
public class ArrayData
Represents the data for an array class. There are two states of SymbolData. One is a continuation which is created when a type is referenced, but the corresponding class has not been read for its members. The other is a complete SymbolData containing all of the member data. This ArrayData stores the SymbolData of its element type inside of it.
| Nested Class Summary | |
|---|---|
static class |
ArrayData.ArrayDataTest
Test the methods in the enclosing class. |
| Nested classes/interfaces inherited from class edu.rice.cs.javalanglevels.SymbolData |
|---|
SymbolData.SymbolDataTest |
| Nested classes/interfaces inherited from class edu.rice.cs.javalanglevels.Data |
|---|
Data.DataTest |
| Field Summary |
|---|
| Fields inherited from class edu.rice.cs.javalanglevels.SymbolData |
|---|
AMBIGUOUS_REFERENCE, BOOLEAN_TYPE, BYTE_TYPE, CHAR_TYPE, DOUBLE_TYPE, EXCEPTION, FLOAT_TYPE, INT_TYPE, LONG_TYPE, NOT_FOUND, NULL_TYPE, SHORT_TYPE, SUPER_CONSTRUCTOR, THIS_CONSTRUCTOR, VOID_TYPE |
| Fields inherited from class edu.rice.cs.javalanglevels.Data |
|---|
_blockIterator, _blocks, _enclosingData, _innerClasses, _modifiersAndVisibility, _name, _outerData, _vars |
| Constructor Summary | |
|---|---|
ArrayData(SymbolData sd,
LanguageLevelVisitor llv,
SourceInfo si)
Creates a new ArrayData corresponding to the elementType sd. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
Returns true if the provided Object is equal to this symbol data. |
int |
getDimensions()
Return the dimensions of this array (the level of nesting until a non-array element type is found). |
SymbolData |
getElementType()
|
ModifiersAndVisibility |
getMav()
|
Data |
getOuterData()
Delegates to the outer data of your element type |
String |
getPackage()
|
int |
hashCode()
Provides a hashcode method that distinguishes between array datas based on name |
boolean |
isAssignableTo(SymbolData assignTo,
JavaVersion version)
Returns true only under the following conditions: if assignTo is a class, assignTo must be java.lang.Object. |
boolean |
isCastableTo(SymbolData castTo,
JavaVersion version)
Return true iff castTo is a class type and is Object castTo is an interface type that is Serializable or Clonable castTo is an array type then this and castTo must have element types that are either the same primitive type or (both reference types and this's element type must be castable to castTo's element type) |
void |
setMav(ModifiersAndVisibility mv)
Sets the ModifiersAndVisibility of the element type to the specified value. |
void |
setOuterData(Data outerData)
A Noop, because arrays shouldn't have outer data |
void |
setPackage(String s)
Set the package of the element type to be the specified package: |
| Methods inherited from class edu.rice.cs.javalanglevels.Data |
|---|
addBlock, addEnclosingData, addInnerClass, addModifier, createUniqueName, dollarSignsToDots, dotsToDollarSigns, getEnclosingClass, getEnclosingData, getInnerClasses, getInnerClassOrInterface, getName, getNextAnonymousInnerClass, getNextBlock, getVar, getVars, hasModifier, isAnonymousClass, isDoublyAnonymous, isOuterData, removeAllBlocks, resetBlockIterator, setEnclosingData, setInnerClasses |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ArrayData(SymbolData sd,
LanguageLevelVisitor llv,
SourceInfo si)
sd - The SymbolData element type; may be a continuationllv - The LanguageLevelVisitor who created this ArrayData.si - The SourceInfo corresponding to this ArrayData.| Method Detail |
|---|
public String getPackage()
getPackage in class SymbolDatapublic void setPackage(String s)
setPackage in class SymbolDatas - The package to usepublic ModifiersAndVisibility getMav()
getMav in class Datapublic void setMav(ModifiersAndVisibility mv)
setMav in class Datamv - The ModifiersAndVisibility to use.public SymbolData getElementType()
public Data getOuterData()
getOuterData in class Datapublic void setOuterData(Data outerData)
setOuterData in class DataouterData - The Data that encloses this data.public boolean equals(Object obj)
SymbolData
equals in class SymbolDatapublic int hashCode()
hashCode in class SymbolData
public boolean isAssignableTo(SymbolData assignTo,
JavaVersion version)
isAssignableTo in class SymbolData
public boolean isCastableTo(SymbolData castTo,
JavaVersion version)
isCastableTo in class SymbolDatacastTo - The TypeData we are trying to cast to. (castTo) this
public int getDimensions()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||