final TraitFunction cgradient = (TraitFunction) getUserObject();
addNode("slot_id", cgradient.getSlotId());
addNode("function", cgradient.getFunction());
}
else if (getUserObject() instanceof TraitMethod) {
final TraitMethod cgradient = (TraitMethod) getUserObject();
addNode("disp_id", cgradient.getDispId());
addNode("method", cgradient.getMethod());
}
else if (getUserObject() instanceof TraitSlot) {
final TraitSlot cgradient = (TraitSlot) getUserObject();
addNode("SpreadMode", cgradient.getSlotId());
addNode("InterpolationMode", cgradient.getTypeName());
addNode("NumGradients", cgradient.getvIndex());
addNode("GradientRecords", cgradient.getvKind());
}
else {
throw new IllegalStateException("Error: Unknown trait kind type");
}
}