use of edu.columbia.cs.psl.phosphor.struct.LazyCharArrayIntTags in project phosphor by gmu-swe.
the class ArrayReflectionMasker method setChar$$PHOSPHORTAGGED.
public static void setChar$$PHOSPHORTAGGED(Object obj, int idxtaint, int idx, int taint, char val) {
if (obj instanceof LazyCharArrayIntTags) {
LazyCharArrayIntTags a = (LazyCharArrayIntTags) obj;
a.set(null, idx, taint, val);
} else
throw new ArrayStoreException("Called setX, but don't have tainted X array!");
}
use of edu.columbia.cs.psl.phosphor.struct.LazyCharArrayIntTags in project phosphor by gmu-swe.
the class ArrayReflectionMasker method newInstance$$PHOSPHORTAGGED.
public static Object newInstance$$PHOSPHORTAGGED(Class clazz, int lenTaint, int len) {
Class tmp = clazz;
int dims = 0;
while (tmp.isArray()) {
tmp = tmp.getComponentType();
dims++;
}
if (tmp.isPrimitive()) {
// else
if (dims == 0) {
if (tmp == Double.TYPE)
return new LazyDoubleArrayIntTags(new double[len]);
if (tmp == Float.TYPE)
return new LazyFloatArrayIntTags(new float[len]);
if (tmp == Integer.TYPE)
return new LazyIntArrayIntTags(new int[len]);
if (tmp == Long.TYPE)
return new LazyLongArrayIntTags(new long[len]);
if (tmp == Short.TYPE)
return new LazyShortArrayIntTags(new short[len]);
if (tmp == Boolean.TYPE)
return new LazyBooleanArrayIntTags(new boolean[len]);
if (tmp == Byte.TYPE)
return new LazyByteArrayIntTags(new byte[len]);
if (tmp == Character.TYPE)
return new LazyCharArrayIntTags(new char[len]);
} else
clazz = MultiDTaintedArrayWithIntTag.getUnderlyingBoxClassForUnderlyingClass(clazz);
}
return Array.newInstance(clazz, len);
}
Aggregations