private void implementGetRoot()
{
getRootMethod = plasticClass.introducePrivateMethod(PlasticUtils.toTypeName(rootType), "getRoot",
SINGLE_OBJECT_ARGUMENT, null);
getRootMethod.changeImplementation(new InstructionBuilderCallback()
{
public void doBuild(InstructionBuilder builder)
{
builder.loadArgument(0).dupe().when(Condition.NULL, new InstructionBuilderCallback()
{
public void doBuild(InstructionBuilder builder)
{
builder.throwException(NullPointerException.class,
String.format("Root object of property expression '%s' is null.", expression));