Java Code Examples for com.sun.tools.corba.se.idl.ValueEntry#state()
The following examples show how to use
com.sun.tools.corba.se.idl.ValueEntry#state() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ValueGen.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
public int helperType (int index, String indent, TCOffsets tcoffsets, String name, SymtabEntry entry, PrintWriter stream) { ValueEntry vt = (ValueEntry) entry; Vector state = vt.state (); int noOfMembers = state == null ? 0 : state.size (); String members = "_members" + index++; String tcOfMembers = "_tcOf" + members; stream.println (indent + "org.omg.CORBA.ValueMember[] " + members + " = new org.omg.CORBA.ValueMember[" + noOfMembers + "];"); stream.println (indent + "org.omg.CORBA.TypeCode " + tcOfMembers + " = null;"); //stream.println (""); // <d61650> String definedInrepId = "_id"; String repId, version; for (int k=0; k<noOfMembers; k++) { InterfaceState valueMember = (InterfaceState)state.elementAt (k); TypedefEntry member = (TypedefEntry)valueMember.entry; SymtabEntry mType = Util.typeOf (member); if (hasRepId (member)) { repId = Util.helperName (mType, true) + ".id ()"; // <d61056> if (mType instanceof ValueEntry || mType instanceof ValueBoxEntry) // OBV spec is silent on defining VersionSpec for valuetype RepIds version = "\"\""; else { String id = mType.repositoryID ().ID (); version = '"' + id.substring (id.lastIndexOf (':')+1) + '"'; } } else { repId = "\"\""; version = "\"\""; } // Get TypeCode for valuetype member and store it var. name given by tcOfMembers stream.println (indent + "// ValueMember instance for " + member.name ()); index = ((JavaGenerator)member.generator ()).type (index, indent, tcoffsets, tcOfMembers, member, stream); stream.println (indent + members + "[" + k + "] = new org.omg.CORBA.ValueMember (" // <d61650> + '"' + member.name () + "\", "); // name stream.println (indent + " " + repId + ", "); // id stream.println (indent + " " + definedInrepId + ", "); // defined_in stream.println (indent + " " + version + ", "); // version stream.println (indent + " " + tcOfMembers + ", "); // type stream.println (indent + " " + "null, "); // type_def stream.println (indent + " " + "org.omg.CORBA." + (valueMember.modifier == InterfaceState.Public ? "PUBLIC_MEMBER" : "PRIVATE_MEMBER") + ".value" + ");"); // access } // end for stream.println (indent + name + " = org.omg.CORBA.ORB.init ().create_value_tc (" + "_id, " + '"' + entry.name () + "\", " + getValueModifier (vt) + ", " + getConcreteBaseTypeCode (vt) + ", " + members + ");"); return index; }
Example 2
Source File: ValueGen.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
public int helperType (int index, String indent, TCOffsets tcoffsets, String name, SymtabEntry entry, PrintWriter stream) { ValueEntry vt = (ValueEntry) entry; Vector state = vt.state (); int noOfMembers = state == null ? 0 : state.size (); String members = "_members" + index++; String tcOfMembers = "_tcOf" + members; stream.println (indent + "org.omg.CORBA.ValueMember[] " + members + " = new org.omg.CORBA.ValueMember[" + noOfMembers + "];"); stream.println (indent + "org.omg.CORBA.TypeCode " + tcOfMembers + " = null;"); //stream.println (""); // <d61650> String definedInrepId = "_id"; String repId, version; for (int k=0; k<noOfMembers; k++) { InterfaceState valueMember = (InterfaceState)state.elementAt (k); TypedefEntry member = (TypedefEntry)valueMember.entry; SymtabEntry mType = Util.typeOf (member); if (hasRepId (member)) { repId = Util.helperName (mType, true) + ".id ()"; // <d61056> if (mType instanceof ValueEntry || mType instanceof ValueBoxEntry) // OBV spec is silent on defining VersionSpec for valuetype RepIds version = "\"\""; else { String id = mType.repositoryID ().ID (); version = '"' + id.substring (id.lastIndexOf (':')+1) + '"'; } } else { repId = "\"\""; version = "\"\""; } // Get TypeCode for valuetype member and store it var. name given by tcOfMembers stream.println (indent + "// ValueMember instance for " + member.name ()); index = ((JavaGenerator)member.generator ()).type (index, indent, tcoffsets, tcOfMembers, member, stream); stream.println (indent + members + "[" + k + "] = new org.omg.CORBA.ValueMember (" // <d61650> + '"' + member.name () + "\", "); // name stream.println (indent + " " + repId + ", "); // id stream.println (indent + " " + definedInrepId + ", "); // defined_in stream.println (indent + " " + version + ", "); // version stream.println (indent + " " + tcOfMembers + ", "); // type stream.println (indent + " " + "null, "); // type_def stream.println (indent + " " + "org.omg.CORBA." + (valueMember.modifier == InterfaceState.Public ? "PUBLIC_MEMBER" : "PRIVATE_MEMBER") + ".value" + ");"); // access } // end for stream.println (indent + name + " = org.omg.CORBA.ORB.init ().create_value_tc (" + "_id, " + '"' + entry.name () + "\", " + getValueModifier (vt) + ", " + getConcreteBaseTypeCode (vt) + ", " + members + ");"); return index; }
Example 3
Source File: ValueGen.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
public int helperType (int index, String indent, TCOffsets tcoffsets, String name, SymtabEntry entry, PrintWriter stream) { ValueEntry vt = (ValueEntry) entry; Vector state = vt.state (); int noOfMembers = state == null ? 0 : state.size (); String members = "_members" + index++; String tcOfMembers = "_tcOf" + members; stream.println (indent + "org.omg.CORBA.ValueMember[] " + members + " = new org.omg.CORBA.ValueMember[" + noOfMembers + "];"); stream.println (indent + "org.omg.CORBA.TypeCode " + tcOfMembers + " = null;"); //stream.println (""); // <d61650> String definedInrepId = "_id"; String repId, version; for (int k=0; k<noOfMembers; k++) { InterfaceState valueMember = (InterfaceState)state.elementAt (k); TypedefEntry member = (TypedefEntry)valueMember.entry; SymtabEntry mType = Util.typeOf (member); if (hasRepId (member)) { repId = Util.helperName (mType, true) + ".id ()"; // <d61056> if (mType instanceof ValueEntry || mType instanceof ValueBoxEntry) // OBV spec is silent on defining VersionSpec for valuetype RepIds version = "\"\""; else { String id = mType.repositoryID ().ID (); version = '"' + id.substring (id.lastIndexOf (':')+1) + '"'; } } else { repId = "\"\""; version = "\"\""; } // Get TypeCode for valuetype member and store it var. name given by tcOfMembers stream.println (indent + "// ValueMember instance for " + member.name ()); index = ((JavaGenerator)member.generator ()).type (index, indent, tcoffsets, tcOfMembers, member, stream); stream.println (indent + members + "[" + k + "] = new org.omg.CORBA.ValueMember (" // <d61650> + '"' + member.name () + "\", "); // name stream.println (indent + " " + repId + ", "); // id stream.println (indent + " " + definedInrepId + ", "); // defined_in stream.println (indent + " " + version + ", "); // version stream.println (indent + " " + tcOfMembers + ", "); // type stream.println (indent + " " + "null, "); // type_def stream.println (indent + " " + "org.omg.CORBA." + (valueMember.modifier == InterfaceState.Public ? "PUBLIC_MEMBER" : "PRIVATE_MEMBER") + ".value" + ");"); // access } // end for stream.println (indent + name + " = org.omg.CORBA.ORB.init ().create_value_tc (" + "_id, " + '"' + entry.name () + "\", " + getValueModifier (vt) + ", " + getConcreteBaseTypeCode (vt) + ", " + members + ");"); return index; }
Example 4
Source File: ValueGen.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
public int helperType (int index, String indent, TCOffsets tcoffsets, String name, SymtabEntry entry, PrintWriter stream) { ValueEntry vt = (ValueEntry) entry; Vector state = vt.state (); int noOfMembers = state == null ? 0 : state.size (); String members = "_members" + index++; String tcOfMembers = "_tcOf" + members; stream.println (indent + "org.omg.CORBA.ValueMember[] " + members + " = new org.omg.CORBA.ValueMember[" + noOfMembers + "];"); stream.println (indent + "org.omg.CORBA.TypeCode " + tcOfMembers + " = null;"); //stream.println (""); // <d61650> String definedInrepId = "_id"; String repId, version; for (int k=0; k<noOfMembers; k++) { InterfaceState valueMember = (InterfaceState)state.elementAt (k); TypedefEntry member = (TypedefEntry)valueMember.entry; SymtabEntry mType = Util.typeOf (member); if (hasRepId (member)) { repId = Util.helperName (mType, true) + ".id ()"; // <d61056> if (mType instanceof ValueEntry || mType instanceof ValueBoxEntry) // OBV spec is silent on defining VersionSpec for valuetype RepIds version = "\"\""; else { String id = mType.repositoryID ().ID (); version = '"' + id.substring (id.lastIndexOf (':')+1) + '"'; } } else { repId = "\"\""; version = "\"\""; } // Get TypeCode for valuetype member and store it var. name given by tcOfMembers stream.println (indent + "// ValueMember instance for " + member.name ()); index = ((JavaGenerator)member.generator ()).type (index, indent, tcoffsets, tcOfMembers, member, stream); stream.println (indent + members + "[" + k + "] = new org.omg.CORBA.ValueMember (" // <d61650> + '"' + member.name () + "\", "); // name stream.println (indent + " " + repId + ", "); // id stream.println (indent + " " + definedInrepId + ", "); // defined_in stream.println (indent + " " + version + ", "); // version stream.println (indent + " " + tcOfMembers + ", "); // type stream.println (indent + " " + "null, "); // type_def stream.println (indent + " " + "org.omg.CORBA." + (valueMember.modifier == InterfaceState.Public ? "PUBLIC_MEMBER" : "PRIVATE_MEMBER") + ".value" + ");"); // access } // end for stream.println (indent + name + " = org.omg.CORBA.ORB.init ().create_value_tc (" + "_id, " + '"' + entry.name () + "\", " + getValueModifier (vt) + ", " + getConcreteBaseTypeCode (vt) + ", " + members + ");"); return index; }
Example 5
Source File: ValueGen.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
public int helperType (int index, String indent, TCOffsets tcoffsets, String name, SymtabEntry entry, PrintWriter stream) { ValueEntry vt = (ValueEntry) entry; Vector state = vt.state (); int noOfMembers = state == null ? 0 : state.size (); String members = "_members" + index++; String tcOfMembers = "_tcOf" + members; stream.println (indent + "org.omg.CORBA.ValueMember[] " + members + " = new org.omg.CORBA.ValueMember[" + noOfMembers + "];"); stream.println (indent + "org.omg.CORBA.TypeCode " + tcOfMembers + " = null;"); //stream.println (""); // <d61650> String definedInrepId = "_id"; String repId, version; for (int k=0; k<noOfMembers; k++) { InterfaceState valueMember = (InterfaceState)state.elementAt (k); TypedefEntry member = (TypedefEntry)valueMember.entry; SymtabEntry mType = Util.typeOf (member); if (hasRepId (member)) { repId = Util.helperName (mType, true) + ".id ()"; // <d61056> if (mType instanceof ValueEntry || mType instanceof ValueBoxEntry) // OBV spec is silent on defining VersionSpec for valuetype RepIds version = "\"\""; else { String id = mType.repositoryID ().ID (); version = '"' + id.substring (id.lastIndexOf (':')+1) + '"'; } } else { repId = "\"\""; version = "\"\""; } // Get TypeCode for valuetype member and store it var. name given by tcOfMembers stream.println (indent + "// ValueMember instance for " + member.name ()); index = ((JavaGenerator)member.generator ()).type (index, indent, tcoffsets, tcOfMembers, member, stream); stream.println (indent + members + "[" + k + "] = new org.omg.CORBA.ValueMember (" // <d61650> + '"' + member.name () + "\", "); // name stream.println (indent + " " + repId + ", "); // id stream.println (indent + " " + definedInrepId + ", "); // defined_in stream.println (indent + " " + version + ", "); // version stream.println (indent + " " + tcOfMembers + ", "); // type stream.println (indent + " " + "null, "); // type_def stream.println (indent + " " + "org.omg.CORBA." + (valueMember.modifier == InterfaceState.Public ? "PUBLIC_MEMBER" : "PRIVATE_MEMBER") + ".value" + ");"); // access } // end for stream.println (indent + name + " = org.omg.CORBA.ORB.init ().create_value_tc (" + "_id, " + '"' + entry.name () + "\", " + getValueModifier (vt) + ", " + getConcreteBaseTypeCode (vt) + ", " + members + ");"); return index; }
Example 6
Source File: ValueGen.java From hottub with GNU General Public License v2.0 | 4 votes |
public int helperType (int index, String indent, TCOffsets tcoffsets, String name, SymtabEntry entry, PrintWriter stream) { ValueEntry vt = (ValueEntry) entry; Vector state = vt.state (); int noOfMembers = state == null ? 0 : state.size (); String members = "_members" + index++; String tcOfMembers = "_tcOf" + members; stream.println (indent + "org.omg.CORBA.ValueMember[] " + members + " = new org.omg.CORBA.ValueMember[" + noOfMembers + "];"); stream.println (indent + "org.omg.CORBA.TypeCode " + tcOfMembers + " = null;"); //stream.println (""); // <d61650> String definedInrepId = "_id"; String repId, version; for (int k=0; k<noOfMembers; k++) { InterfaceState valueMember = (InterfaceState)state.elementAt (k); TypedefEntry member = (TypedefEntry)valueMember.entry; SymtabEntry mType = Util.typeOf (member); if (hasRepId (member)) { repId = Util.helperName (mType, true) + ".id ()"; // <d61056> if (mType instanceof ValueEntry || mType instanceof ValueBoxEntry) // OBV spec is silent on defining VersionSpec for valuetype RepIds version = "\"\""; else { String id = mType.repositoryID ().ID (); version = '"' + id.substring (id.lastIndexOf (':')+1) + '"'; } } else { repId = "\"\""; version = "\"\""; } // Get TypeCode for valuetype member and store it var. name given by tcOfMembers stream.println (indent + "// ValueMember instance for " + member.name ()); index = ((JavaGenerator)member.generator ()).type (index, indent, tcoffsets, tcOfMembers, member, stream); stream.println (indent + members + "[" + k + "] = new org.omg.CORBA.ValueMember (" // <d61650> + '"' + member.name () + "\", "); // name stream.println (indent + " " + repId + ", "); // id stream.println (indent + " " + definedInrepId + ", "); // defined_in stream.println (indent + " " + version + ", "); // version stream.println (indent + " " + tcOfMembers + ", "); // type stream.println (indent + " " + "null, "); // type_def stream.println (indent + " " + "org.omg.CORBA." + (valueMember.modifier == InterfaceState.Public ? "PUBLIC_MEMBER" : "PRIVATE_MEMBER") + ".value" + ");"); // access } // end for stream.println (indent + name + " = org.omg.CORBA.ORB.init ().create_value_tc (" + "_id, " + '"' + entry.name () + "\", " + getValueModifier (vt) + ", " + getConcreteBaseTypeCode (vt) + ", " + members + ");"); return index; }
Example 7
Source File: ValueGen.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
public int helperType (int index, String indent, TCOffsets tcoffsets, String name, SymtabEntry entry, PrintWriter stream) { ValueEntry vt = (ValueEntry) entry; Vector state = vt.state (); int noOfMembers = state == null ? 0 : state.size (); String members = "_members" + index++; String tcOfMembers = "_tcOf" + members; stream.println (indent + "org.omg.CORBA.ValueMember[] " + members + " = new org.omg.CORBA.ValueMember[" + noOfMembers + "];"); stream.println (indent + "org.omg.CORBA.TypeCode " + tcOfMembers + " = null;"); //stream.println (""); // <d61650> String definedInrepId = "_id"; String repId, version; for (int k=0; k<noOfMembers; k++) { InterfaceState valueMember = (InterfaceState)state.elementAt (k); TypedefEntry member = (TypedefEntry)valueMember.entry; SymtabEntry mType = Util.typeOf (member); if (hasRepId (member)) { repId = Util.helperName (mType, true) + ".id ()"; // <d61056> if (mType instanceof ValueEntry || mType instanceof ValueBoxEntry) // OBV spec is silent on defining VersionSpec for valuetype RepIds version = "\"\""; else { String id = mType.repositoryID ().ID (); version = '"' + id.substring (id.lastIndexOf (':')+1) + '"'; } } else { repId = "\"\""; version = "\"\""; } // Get TypeCode for valuetype member and store it var. name given by tcOfMembers stream.println (indent + "// ValueMember instance for " + member.name ()); index = ((JavaGenerator)member.generator ()).type (index, indent, tcoffsets, tcOfMembers, member, stream); stream.println (indent + members + "[" + k + "] = new org.omg.CORBA.ValueMember (" // <d61650> + '"' + member.name () + "\", "); // name stream.println (indent + " " + repId + ", "); // id stream.println (indent + " " + definedInrepId + ", "); // defined_in stream.println (indent + " " + version + ", "); // version stream.println (indent + " " + tcOfMembers + ", "); // type stream.println (indent + " " + "null, "); // type_def stream.println (indent + " " + "org.omg.CORBA." + (valueMember.modifier == InterfaceState.Public ? "PUBLIC_MEMBER" : "PRIVATE_MEMBER") + ".value" + ");"); // access } // end for stream.println (indent + name + " = org.omg.CORBA.ORB.init ().create_value_tc (" + "_id, " + '"' + entry.name () + "\", " + getValueModifier (vt) + ", " + getConcreteBaseTypeCode (vt) + ", " + members + ");"); return index; }
Example 8
Source File: ValueGen.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
public int helperType (int index, String indent, TCOffsets tcoffsets, String name, SymtabEntry entry, PrintWriter stream) { ValueEntry vt = (ValueEntry) entry; Vector state = vt.state (); int noOfMembers = state == null ? 0 : state.size (); String members = "_members" + index++; String tcOfMembers = "_tcOf" + members; stream.println (indent + "org.omg.CORBA.ValueMember[] " + members + " = new org.omg.CORBA.ValueMember[" + noOfMembers + "];"); stream.println (indent + "org.omg.CORBA.TypeCode " + tcOfMembers + " = null;"); //stream.println (""); // <d61650> String definedInrepId = "_id"; String repId, version; for (int k=0; k<noOfMembers; k++) { InterfaceState valueMember = (InterfaceState)state.elementAt (k); TypedefEntry member = (TypedefEntry)valueMember.entry; SymtabEntry mType = Util.typeOf (member); if (hasRepId (member)) { repId = Util.helperName (mType, true) + ".id ()"; // <d61056> if (mType instanceof ValueEntry || mType instanceof ValueBoxEntry) // OBV spec is silent on defining VersionSpec for valuetype RepIds version = "\"\""; else { String id = mType.repositoryID ().ID (); version = '"' + id.substring (id.lastIndexOf (':')+1) + '"'; } } else { repId = "\"\""; version = "\"\""; } // Get TypeCode for valuetype member and store it var. name given by tcOfMembers stream.println (indent + "// ValueMember instance for " + member.name ()); index = ((JavaGenerator)member.generator ()).type (index, indent, tcoffsets, tcOfMembers, member, stream); stream.println (indent + members + "[" + k + "] = new org.omg.CORBA.ValueMember (" // <d61650> + '"' + member.name () + "\", "); // name stream.println (indent + " " + repId + ", "); // id stream.println (indent + " " + definedInrepId + ", "); // defined_in stream.println (indent + " " + version + ", "); // version stream.println (indent + " " + tcOfMembers + ", "); // type stream.println (indent + " " + "null, "); // type_def stream.println (indent + " " + "org.omg.CORBA." + (valueMember.modifier == InterfaceState.Public ? "PUBLIC_MEMBER" : "PRIVATE_MEMBER") + ".value" + ");"); // access } // end for stream.println (indent + name + " = org.omg.CORBA.ORB.init ().create_value_tc (" + "_id, " + '"' + entry.name () + "\", " + getValueModifier (vt) + ", " + getConcreteBaseTypeCode (vt) + ", " + members + ");"); return index; }