} else if (object instanceof Float) {
returnValue = new FloatToken(((Float) object).floatValue());
} else if (object instanceof Complex) {
returnValue = new ComplexToken((Complex) object);
} else if (object instanceof FixPoint) {
returnValue = new FixToken((FixPoint) object);
} else if (object instanceof String) {
returnValue = new StringToken((String) object);
} else if (object instanceof boolean[][]) {
returnValue = new BooleanMatrixToken((boolean[][]) object);
} else if (object instanceof int[][]) {
returnValue = new IntMatrixToken((int[][]) object);
} else if (object instanceof long[][]) {
returnValue = new LongMatrixToken((long[][]) object);
} else if (object instanceof double[][]) {
returnValue = new DoubleMatrixToken((double[][]) object);
} else if (object instanceof Complex[][]) {
returnValue = new ComplexMatrixToken((Complex[][]) object);
} else if (object instanceof FixPoint[][]) {
returnValue = new FixMatrixToken((FixPoint[][]) object);
} else if (object instanceof double[]) {
DoubleToken[] temp = new DoubleToken[((double[]) object).length];
for (int j = 0; j < temp.length; j++) {
temp[j] = new DoubleToken(((double[]) object)[j]);
}
returnValue = new ArrayToken(temp);
} else if (object instanceof Complex[]) {
ComplexToken[] temp = new ComplexToken[((Complex[]) object).length];
for (int j = 0; j < temp.length; j++) {
temp[j] = new ComplexToken(((Complex[]) object)[j]);
}
returnValue = new ArrayToken(temp);
} else if (object instanceof int[]) {
IntToken[] temp = new IntToken[((int[]) object).length];
for (int j = 0; j < temp.length; j++) {
temp[j] = new IntToken(((int[]) object)[j]);
}
returnValue = new ArrayToken(temp);
} else if (object instanceof long[]) {
LongToken[] temp = new LongToken[((long[]) object).length];
for (int j = 0; j < temp.length; j++) {
temp[j] = new LongToken(((long[]) object)[j]);
}
returnValue = new ArrayToken(temp);
} else if (object instanceof boolean[]) {
BooleanToken[] temp = new BooleanToken[((boolean[]) object).length];
for (int j = 0; j < temp.length; j++) {
temp[j] = new BooleanToken(((boolean[]) object)[j]);
}
returnValue = new ArrayToken(temp);
} else if (object instanceof String[]) {
StringToken[] temp = new StringToken[((String[]) object).length];
for (int j = 0; j < temp.length; j++) {
temp[j] = new StringToken(((String[]) object)[j]);
}
returnValue = new ArrayToken(temp);
} else if (object instanceof FixPoint[]) {
// Create back an ArrayToken containing FixTokens
FixToken[] temp = new FixToken[((FixPoint[]) object).length];
for (int j = 0; j < temp.length; j++) {
temp[j] = new FixToken(((FixPoint[]) object)[j]);
}
returnValue = new ArrayToken(temp);
} else {
// Package into an ObjectToken.