@Override
public List<StackElement> getPoppedElements(DecompilationContext dc) {
List<StackElement> elements = new ArrayList<StackElement>();
RefInfo ri = (RefInfo) dc.getConstantPool().get(this.index);
Descriptor desc = ri.getDescriptor();
JavaType jt = desc.getReturn();
if (jt.getDimensionCount() > 0 || (!jt.isPrimitive())) {
// array or primitive are both refs
elements.add(new StackElement("value", StackElementType.REF));
} else {
// primitive non-array
if (jt.getType().equals("long")) {
elements.add(new StackElement("value", StackElementType.LONG));
} else if (jt.getType().equals("float")) {
elements.add(new StackElement("value", StackElementType.FLOAT));
} else if (jt.getType().equals("double")) {
elements.add(new StackElement("value", StackElementType.DOUBLE));
} else {
// boolean, byte, short, char and int are all of type int
elements.add(new StackElement("value", StackElementType.INT));
}