Java Code Examples for com.sun.tools.corba.se.idl.SymtabEntry#type()

The following examples show how to use com.sun.tools.corba.se.idl.SymtabEntry#type() . 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: StructGen.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 *
 **/
protected void writeMembers ()
{
  // Write members and populate quality arrays
  int size = s.members ().size ();
  memberIsPrimitive = new boolean [size];
  memberIsInterface = new boolean [size];
  memberIsTypedef   = new boolean [size];
  for (int i = 0; i < s.members ().size (); ++i)
  {
    SymtabEntry member = (SymtabEntry)s.members ().elementAt (i);
    memberIsPrimitive[i] = member.type () instanceof PrimitiveEntry;
    memberIsInterface[i] = member.type () instanceof InterfaceEntry;
    memberIsTypedef[i]   = member.type () instanceof TypedefEntry;
    Util.fillInfo (member);
    // Transfer member comment to target <31jul1997>.
    if (member.comment () != null)
       member.comment ().generate ("  ", stream);
    Util.writeInitializer ("  public ", member.name (), "", member, stream);
  }
}
 
Example 2
Source File: ConstGen.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Write the constant's value according to its type.
 **/
private void writeConstValue (SymtabEntry type)
{
  if (type instanceof PrimitiveEntry)
    stream.println ('(' + Util.javaName (type) + ")(" + Util.parseExpression (c.value ()) + ");");
  else if (type instanceof StringEntry)
    stream.println (Util.parseExpression (c.value ()) + ';');
  else if (type instanceof TypedefEntry)
  {
    while (type instanceof TypedefEntry)
      type = type.type ();
    writeConstValue (type);
  }
  else
    stream.println (Util.parseExpression (c.value ()) + ';');
}
 
Example 3
Source File: StructGen.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 *
 **/
protected void writeMembers ()
{
  // Write members and populate quality arrays
  int size = s.members ().size ();
  memberIsPrimitive = new boolean [size];
  memberIsInterface = new boolean [size];
  memberIsTypedef   = new boolean [size];
  for (int i = 0; i < s.members ().size (); ++i)
  {
    SymtabEntry member = (SymtabEntry)s.members ().elementAt (i);
    memberIsPrimitive[i] = member.type () instanceof PrimitiveEntry;
    memberIsInterface[i] = member.type () instanceof InterfaceEntry;
    memberIsTypedef[i]   = member.type () instanceof TypedefEntry;
    Util.fillInfo (member);
    // Transfer member comment to target <31jul1997>.
    if (member.comment () != null)
       member.comment ().generate ("  ", stream);
    Util.writeInitializer ("  public ", member.name (), "", member, stream);
  }
}
 
Example 4
Source File: ConstGen.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Write the constant's value according to its type.
 **/
private void writeConstValue (SymtabEntry type)
{
  if (type instanceof PrimitiveEntry)
    stream.println ('(' + Util.javaName (type) + ")(" + Util.parseExpression (c.value ()) + ");");
  else if (type instanceof StringEntry)
    stream.println (Util.parseExpression (c.value ()) + ';');
  else if (type instanceof TypedefEntry)
  {
    while (type instanceof TypedefEntry)
      type = type.type ();
    writeConstValue (type);
  }
  else
    stream.println (Util.parseExpression (c.value ()) + ';');
}
 
Example 5
Source File: ValueGen.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private static boolean hasRepId (SymtabEntry member)
{
  SymtabEntry mType = Util.typeOf (member);
  return !( mType instanceof PrimitiveEntry ||
            mType instanceof StringEntry ||
            ( mType instanceof TypedefEntry &&
              !(((TypedefEntry)mType).arrayInfo ().isEmpty ()) ) ||
            ( mType instanceof TypedefEntry && member.type () instanceof SequenceEntry) );
}
 
Example 6
Source File: Util.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 *
 **/
static void fillValueBoxInfo (ValueBoxEntry vb)
{
  SymtabEntry stateMember = (((InterfaceState) vb.state ().elementAt (0)).entry);
  if (stateMember.type() != null)
    Util.fillInfo (stateMember.type ());
  Util.fillInfo (stateMember);
}
 
Example 7
Source File: Util.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 *
 **/
public static SymtabEntry typeOf (SymtabEntry entry)
{
  while (entry instanceof TypedefEntry && ((TypedefEntry)entry).arrayInfo ().isEmpty () && !(entry.type () instanceof SequenceEntry))
    entry = entry.type ();
  return entry;
}
 
Example 8
Source File: Util.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 *
 **/
public static SymtabEntry typeOf (SymtabEntry entry)
{
  while (entry instanceof TypedefEntry && ((TypedefEntry)entry).arrayInfo ().isEmpty () && !(entry.type () instanceof SequenceEntry))
    entry = entry.type ();
  return entry;
}
 
Example 9
Source File: Util.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 *
 **/
static void fillValueBoxInfo (ValueBoxEntry vb)
{
  SymtabEntry stateMember = (((InterfaceState) vb.state ().elementAt (0)).entry);
  if (stateMember.type() != null)
    Util.fillInfo (stateMember.type ());
  Util.fillInfo (stateMember);
}
 
Example 10
Source File: ValueGen.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private static boolean hasRepId (SymtabEntry member)
{
  SymtabEntry mType = Util.typeOf (member);
  return !( mType instanceof PrimitiveEntry ||
            mType instanceof StringEntry ||
            ( mType instanceof TypedefEntry &&
              !(((TypedefEntry)mType).arrayInfo ().isEmpty ()) ) ||
            ( mType instanceof TypedefEntry && member.type () instanceof SequenceEntry) );
}
 
Example 11
Source File: Util.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 *
 **/
public static SymtabEntry typeOf (SymtabEntry entry)
{
  while (entry instanceof TypedefEntry && ((TypedefEntry)entry).arrayInfo ().isEmpty () && !(entry.type () instanceof SequenceEntry))
    entry = entry.type ();
  return entry;
}
 
Example 12
Source File: ValueGen.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private static boolean hasRepId (SymtabEntry member)
{
  SymtabEntry mType = Util.typeOf (member);
  return !( mType instanceof PrimitiveEntry ||
            mType instanceof StringEntry ||
            ( mType instanceof TypedefEntry &&
              !(((TypedefEntry)mType).arrayInfo ().isEmpty ()) ) ||
            ( mType instanceof TypedefEntry && member.type () instanceof SequenceEntry) );
}
 
Example 13
Source File: Util.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Determine the import lines for template types.
 **/
static private void checkForBounds (SymtabEntry entry, Vector importTypes, Vector importList)
{
  // Obtain actual type, just to be complete.
  SymtabEntry entryType = entry;
  while (entryType instanceof TypedefEntry)
    entryType = entryType.type ();

  if (entryType instanceof StringEntry && ((StringEntry)entryType).maxSize () != null)
    checkForGlobalConstants (((StringEntry)entryType).maxSize ().rep (), importTypes, importList);
  else
    if (entryType instanceof SequenceEntry && ((SequenceEntry)entryType).maxSize () != null)
      checkForGlobalConstants (((SequenceEntry)entryType).maxSize ().rep (), importTypes, importList);
}
 
Example 14
Source File: ValueGen.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private static boolean hasRepId (SymtabEntry member)
{
  SymtabEntry mType = Util.typeOf (member);
  return !( mType instanceof PrimitiveEntry ||
            mType instanceof StringEntry ||
            ( mType instanceof TypedefEntry &&
              !(((TypedefEntry)mType).arrayInfo ().isEmpty ()) ) ||
            ( mType instanceof TypedefEntry && member.type () instanceof SequenceEntry) );
}
 
Example 15
Source File: Util.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 *
 **/
static void fillValueBoxInfo (ValueBoxEntry vb)
{
  SymtabEntry stateMember = (((InterfaceState) vb.state ().elementAt (0)).entry);
  if (stateMember.type() != null)
    Util.fillInfo (stateMember.type ());
  Util.fillInfo (stateMember);
}
 
Example 16
Source File: Util.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 *
 **/
static void fillValueBoxInfo (ValueBoxEntry vb)
{
  SymtabEntry stateMember = (((InterfaceState) vb.state ().elementAt (0)).entry);
  if (stateMember.type() != null)
    Util.fillInfo (stateMember.type ());
  Util.fillInfo (stateMember);
}
 
Example 17
Source File: ValueGen.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private static boolean hasRepId (SymtabEntry member)
{
  SymtabEntry mType = Util.typeOf (member);
  return !( mType instanceof PrimitiveEntry ||
            mType instanceof StringEntry ||
            ( mType instanceof TypedefEntry &&
              !(((TypedefEntry)mType).arrayInfo ().isEmpty ()) ) ||
            ( mType instanceof TypedefEntry && member.type () instanceof SequenceEntry) );
}
 
Example 18
Source File: Util.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Determine the import lines for template types.
 **/
static private void checkForBounds (SymtabEntry entry, Vector importTypes, Vector importList)
{
  // Obtain actual type, just to be complete.
  SymtabEntry entryType = entry;
  while (entryType instanceof TypedefEntry)
    entryType = entryType.type ();

  if (entryType instanceof StringEntry && ((StringEntry)entryType).maxSize () != null)
    checkForGlobalConstants (((StringEntry)entryType).maxSize ().rep (), importTypes, importList);
  else
    if (entryType instanceof SequenceEntry && ((SequenceEntry)entryType).maxSize () != null)
      checkForGlobalConstants (((SequenceEntry)entryType).maxSize ().rep (), importTypes, importList);
}
 
Example 19
Source File: ValueGen.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private static boolean hasRepId (SymtabEntry member)
{
  SymtabEntry mType = Util.typeOf (member);
  return !( mType instanceof PrimitiveEntry ||
            mType instanceof StringEntry ||
            ( mType instanceof TypedefEntry &&
              !(((TypedefEntry)mType).arrayInfo ().isEmpty ()) ) ||
            ( mType instanceof TypedefEntry && member.type () instanceof SequenceEntry) );
}
 
Example 20
Source File: Util.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 *
 **/
public static SymtabEntry typeOf (SymtabEntry entry)
{
  while (entry instanceof TypedefEntry && ((TypedefEntry)entry).arrayInfo ().isEmpty () && !(entry.type () instanceof SequenceEntry))
    entry = entry.type ();
  return entry;
}