Package com.sun.tools.corba.ee.idl
Class Factories
java.lang.Object
com.sun.tools.corba.ee.idl.Factories
- Direct Known Subclasses:
Factories
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn a subclass of the Arguments class.Return the implementation of the ExprFactory interface.Return the implementation of the GenFactory interface.String[]
Return the list of keywords in the generated language.Return the implementation of the SymtabFactory interface.
-
Constructor Details
-
Factories
public Factories()
-
-
Method Details
-
genFactory
Return the implementation of the GenFactory interface. If this returns null, then the compiler cannot generate anything.- Returns:
- null
-
symtabFactory
Return the implementation of the SymtabFactory interface. If this returns null, the default symbol table entries will be used.- Returns:
DefaultSymtabFactory
-
exprFactory
Return the implementation of the ExprFactory interface. If this returns null, the default expressions will be used.- Returns:
DefaultSymtabFactory
-
arguments
Return a subclass of the Arguments class. If this returns null, the default will be used.- Returns:
- a new instance of
Arguments
-
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
-