Class Factories

java.lang.Object
com.sun.tools.corba.ee.idl.Factories
Direct Known Subclasses:
Factories

public class Factories extends Object
If the framework is being extended, this class must be extended. At very least, the genFactory method must be overridden to return the code generator extensions. The remaining methods may be overridden if necessary:
symtabFactory
If you wish to extend the symbol table entries, this method must return the factory which constructs those extensions. If you only want to extend a few of the symbol table entries, it may be useful to extend DefaultSymtabFactory and only override the pertinent methods.
exprFactory
If you wish to extend the expression classes, this method must return the factory which constructs those extensions. If you only want to extend a few of the expression classes, it may be useful to extend com.sun.tools.corba.ee.idl.constExpr.DefaultSymtabFactory and only override the pertinent methods.
arguments
If you wish to add additional arguments to the base set of arguments, extend Arguments and override this method to return that class.
languageKeywords
If the language you are generating code in has keywords other than IDL keywords, these keywords should be returned by this method. The framework will prepend any IDL identifiers it encounters which are in this list with an underscore (`_') to avoid compilation errors. For instance, `catch' is a Java keyword. If the generators are emitting Java code for the following IDL, emitting `catch' as is will cause compile errors, so it is changed to `_catch':
IDL:
const long catch = 22;
Possible generated code:
public static final int _catch = 22;
  • Constructor Details

    • Factories

      public Factories()
  • Method Details

    • genFactory

      public GenFactory genFactory()
      Return the implementation of the GenFactory interface. If this returns null, then the compiler cannot generate anything.
      Returns:
      null
    • symtabFactory

      public SymtabFactory symtabFactory()
      Return the implementation of the SymtabFactory interface. If this returns null, the default symbol table entries will be used.
      Returns:
      DefaultSymtabFactory
    • exprFactory

      public ExprFactory exprFactory()
      Return the implementation of the ExprFactory interface. If this returns null, the default expressions will be used.
      Returns:
      DefaultSymtabFactory
    • arguments

      public Arguments arguments()
      Return a subclass of the Arguments class. If this returns null, the default will be used.
      Returns:
      a new instance of Arguments
    • languageKeywords

      public String[] languageKeywords()
      Return the list of keywords in the generated language. Note that these keywords may contain the following wildcards:
      `*'
      matches zero or more characters
      `+'
      matches one or more characters
      `.'
      matches any single character
      Returns:
      an array of keywords