예제 #1
0
 @Override
 public void virtualize(VirtualizerTool tool) {
   ValueNode alias = tool.getAlias(object());
   if (alias instanceof VirtualObjectNode) {
     tool.replaceWithVirtual((VirtualObjectNode) alias);
   }
 }
예제 #2
0
 @Override
 public void virtualize(VirtualizerTool tool) {
   ValueNode alias = tool.getAlias(object());
   if (alias instanceof VirtualObjectNode) {
     VirtualInstanceNode virtual = (VirtualInstanceNode) alias;
     int fieldIndex = virtual.fieldIndex(field());
     if (fieldIndex != -1) {
       tool.setVirtualEntry(virtual, fieldIndex, value(), false);
       tool.delete();
     }
   }
 }