1 21 package org.jacorb.ir.gui.typesystem.remote; 22 23 import java.util.*; 24 import org.omg.CORBA.*; 25 import javax.swing.tree.*; 26 27 public class IRConstant extends IRNodeWithType 28 { 29 protected java.lang.Object value; 30 31 34 public IRConstant ( ) { 35 super(); 36 } 37 38 42 43 public IRConstant ( IRObject irObject) 44 { 45 super(irObject); 46 ConstantDef constantDef = ConstantDefHelper.narrow((org.omg.CORBA.Object )irObject); 47 setAssociatedTypeSystemNode(RemoteTypeSystem.createTypeSystemNode(constantDef.type_def())); 48 Any any = constantDef.value(); 49 this.value = org.jacorb.ir.gui.remoteobject.ObjectRepresentantFactory.objectFromAny(any); 50 } 51 52 56 57 public String description() { 58 String result = super.description(); 59 result = result + "\nConstant value =\t" + value; 60 return result; 61 } 62 63 67 public static String nodeTypeName() { 68 return "const"; 69 } 70 } 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | Popular Tags |