java.lang.Object
com.sun.tools.corba.ee.idl.Util
com.sun.tools.corba.ee.idl.toJavaPortable.Util

public class Util extends Util
Class Util is a repository of static members available for general use by the IDL parser framework and any generator extensions.
  • Field Details

  • Constructor Details

    • Util

      public Util()
  • Method Details

    • getVersion

      public static String getVersion()
      Fetch the version number of this build of the IDL-to-Java (portable) compiler from the appropriate properties file.
      Returns:
      the version number of this compiler build.
    • setSymbolTable

      static void setSymbolTable(Hashtable symtab)
      This method is called by Setup.preEmit, so symbolTable is available for all Util methods.
    • setPackageTranslation

      public static void setPackageTranslation(Hashtable pkgtrans)
    • isInterface

      public static boolean isInterface(String name)
    • arrayInfo

      static String arrayInfo(Vector<Expression> arrayInfo)
    • sansArrayInfo

      public static String sansArrayInfo(Vector arrayInfo)
    • sansArrayInfo

      public static String sansArrayInfo(String name)
    • fileName

      public static String fileName(SymtabEntry entry, String extension)
      Given a symbol table entry, return the name of the file which should be created.
    • fileName

      public static String fileName(SymtabEntry entry, NameModifier modifier, String extension)
    • stream

      public static GenFileStream stream(SymtabEntry entry, String extension)
    • stream

      public static GenFileStream stream(SymtabEntry entry, NameModifier modifier, String extension)
    • getStream

      public static GenFileStream getStream(String name, SymtabEntry entry)
    • containerFullName

      public static String containerFullName(SymtabEntry container)
    • translate

      public static String translate(String name)
    • doContainerFullName

      private static String doContainerFullName(SymtabEntry container)
    • javaName

      public static String javaName(SymtabEntry entry)
      Given a SymtabEntry, return the string which should be used for this entry. Enums are converted to ints, typedefs and sequences are converted to their info types. javaQualifiedName does not do any of these conversions.
    • javaPrimName

      public static String javaPrimName(String name)
    • javaNativeName

      public static String javaNativeName(String name)
    • javaQualifiedName

      public static String javaQualifiedName(SymtabEntry entry)
      Given a symtabEntry, return the name of this entry. This method does not do any conversions like javaName does.
    • collapseName

      public static String collapseName(String name)
      Collapse primitive type names.
    • typeOf

      public static SymtabEntry typeOf(SymtabEntry entry)
    • fillInfo

      static void fillInfo(SymtabEntry infoEntry)
      Fill the info field with the full name (with array info) of the type.
    • fillValueBoxInfo

      static void fillValueBoxInfo(ValueBoxEntry vb)
    • holderName

      public static String holderName(SymtabEntry entry)
    • helperName

      public static String helperName(SymtabEntry entry, boolean qualifiedName)
    • writePackage

      public static void writePackage(PrintWriter stream, SymtabEntry entry)
    • writePackage

      public static void writePackage(PrintWriter stream, SymtabEntry entry, String name, short type)
    • writePackage

      public static void writePackage(PrintWriter stream, SymtabEntry entry, short type)
    • printImports

      private static void printImports(Vector<String> importList, PrintWriter stream)
    • addTo

      private static void addTo(Vector<String> importList, String name)
    • addImportLines

      private static Vector<String> addImportLines(SymtabEntry entry, Vector importTypes, short type)
    • checkForArrays

      private static void checkForArrays(SymtabEntry entry, Vector<SymtabEntry> importTypes, Vector<String> importList)
    • checkForArrayBase

      private static String checkForArrayBase(TypedefEntry t, Vector<SymtabEntry> importTypes, Vector<String> importList)
    • checkForArrayDimensions

      private static void checkForArrayDimensions(String arrays, Vector<SymtabEntry> importTypes, Vector<String> importList)
    • checkForBounds

      private static void checkForBounds(SymtabEntry entry, Vector<SymtabEntry> importTypes, Vector<String> importList)
      Determine the import lines for template types.
    • checkForGlobalConstants

      private static void checkForGlobalConstants(String exprRep, Vector<SymtabEntry> importTypes, Vector<String> importList)
      Extract the global constants from the supplied integer expression representation (string) and add them to the supplied import list.
    • writeInitializer

      public static void writeInitializer(String indent, String name, String arrayDcl, SymtabEntry entry, PrintWriter stream)
    • writeInitializer

      public static void writeInitializer(String indent, String name, String arrayDcl, SymtabEntry entry, String initializer, PrintWriter stream)
    • mkdir

      public static void mkdir(String name)
    • writeProlog

      public static void writeProlog(PrintWriter stream, String filename)
    • stripLeadingUnderscores

      public static String stripLeadingUnderscores(String string)
    • stripLeadingUnderscoresFromID

      public static String stripLeadingUnderscoresFromID(String string)
    • parseExpression

      public static String parseExpression(Expression e)
    • parseTerminal

      static String parseTerminal(Terminal e)
    • hexToOctal

      static String hexToOctal(String hex)
    • parseBinary

      static String parseBinary(BinaryExpr e)
    • parseUnary

      static String parseUnary(UnaryExpr e)
    • IDLEntity

      public static boolean IDLEntity(SymtabEntry entry)
    • corbaLevel

      public static boolean corbaLevel(float min, float max)
      Returns:
      true if the current setting of corbaLevel is within delta of the range min <= corbaLevel <= max