}
if (this.addr == 0) {
return;
}
Type type = getType();
CASImpl cas = this.fSTreeModel.getCas();
if (this.fSTreeModel.getCas().isArrayType(type)) {
int arrayLength = cas.ll_getArraySize((int) this.addr);
// if (arrayLength > 20) {
// arrayLength = 20;
// }
FSNode node = null;
int arrayPos = cas.getArrayStartAddress((int) this.addr);
int nodeClass1;
if (cas.isIntArrayType(type)) {
nodeClass1 = FSNode.INT_FS;
} else if (cas.isFloatArrayType(type)) {
nodeClass1 = FSNode.FLOAT_FS;
} else if (cas.isStringArrayType(type)) {
nodeClass1 = FSNode.STRING_FS;
} else if (cas.isByteArrayType(type)) {
nodeClass1 = FSNode.BYTE_FS;
} else if (cas.isBooleanArrayType(type)) {
nodeClass1 = FSNode.BOOL_FS;
} else if (cas.isShortArrayType(type)) {
nodeClass1 = FSNode.SHORT_FS;
} else if (cas.isLongArrayType(type)) {
nodeClass1 = FSNode.LONG_FS;
} else if (cas.isDoubleArrayType(type)) {
nodeClass1 = FSNode.DOUBLE_FS;
} else {
nodeClass1 = FSNode.STD_FS;
}
ArrayList arrayNodes = new ArrayList(arrayLength);
if (nodeClass1 == INT_FS || nodeClass1 == FLOAT_FS || nodeClass1 == STRING_FS
|| nodeClass1 == STD_FS) {
for (int i = 0; i < arrayLength; i++) {
node = new FSNode(this.fSTreeModel, nodeClass1, cas.getHeapValue(arrayPos), i);
arrayNodes.add(node);
++arrayPos;
}
} else if (nodeClass1 == BYTE_FS) {
for (int i = 0; i < arrayLength; i++) {
node = new FSNode(this.fSTreeModel, nodeClass1, cas.ll_getByteArrayValue((int) this.addr,
i), i);
arrayNodes.add(node);
++arrayPos;
}
} else if (nodeClass1 == SHORT_FS) {
for (int i = 0; i < arrayLength; i++) {
node = new FSNode(this.fSTreeModel, nodeClass1, cas.ll_getShortArrayValue(
(int) this.addr, i), i);
arrayNodes.add(node);
++arrayPos;
}
} else if (nodeClass1 == BOOL_FS) {
for (int i = 0; i < arrayLength; i++) {
int temp = cas.ll_getBooleanArrayValue((int) this.addr, i) ? 1 : 0;
node = new FSNode(this.fSTreeModel, nodeClass1, temp, i);
arrayNodes.add(node);
++arrayPos;
}
} else if (nodeClass1 == LONG_FS) {
for (int i = 0; i < arrayLength; i++) {
long temp = cas.ll_getLongArrayValue((int) this.addr, i);
node = new FSNode(this.fSTreeModel, nodeClass1, temp, i);
arrayNodes.add(node);
++arrayPos;
}
} else if (nodeClass1 == DOUBLE_FS) {
for (int i = 0; i < arrayLength; i++) {
double temp = cas.ll_getDoubleArrayValue((int) this.addr, i);
node = new FSNode(this.fSTreeModel, nodeClass1, CASImpl.double2long(temp), i);
arrayNodes.add(node);
++arrayPos;
}
}
this.children = FSTreeModel.createArrayChildren(0, arrayLength, arrayNodes, this.fSTreeModel);
} else {
this.children = new ArrayList();
List feats = type.getFeatures();
for (int i = 0; i < feats.size(); i++) {
FeatureImpl feat1 = (FeatureImpl) feats.get(i);
long featAddr = cas.getHeapValue((int) this.addr + cas.getFeatureOffset(feat1.getCode()));
if (cas.isDoubleType(feat1.getRange()) || cas.isLongType(feat1.getRange())) {
featAddr = cas.ll_getLongValue((int) featAddr);
}
FSNode childNode = new FSNode(this.fSTreeModel, this.fSTreeModel.getNodeType(
(int) this.addr, feat1), featAddr, feat1);
this.children.add(childNode);
}