public static final class Smc.Language extends Object
SmcCodeGenerator subclass, and
SmcCodeGenerator subclass.
The reason the above information is stored in this
class and not in the TargetLanguage enum is due
to the code generator classes. If these classes were
stored in TargetLanguage, this would create a
circular dependency between the model and generator
modules.
| Constructor and Description |
|---|
Language(TargetLanguage language,
String optionFlag,
String name,
Class generator,
Class headerGenerator)
Creates a new language instance for the given
properties.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o)
Returns
true if o is a
Language instance referencing the same
TargetLanguage. |
SmcCodeGenerator |
generator(SmcOptions options)
Returns an instance of the source code generator.
|
int |
hashCode()
Returns the
TargetLanguage ordinal value as
the hash code. |
boolean |
hasHeaderFile()
Returns
true if this language uses header
files. |
SmcCodeGenerator |
headerGenerator(SmcOptions options)
Returns an instance of the header code generator.
|
TargetLanguage |
language()
Returns the associated
TargetLanguage. |
String |
name()
Returns the full language name.
|
String |
optionFlag()
Returns the command line option string for this
language.
|
String |
toString()
Returns the full language name.
|
public Language(TargetLanguage language, String optionFlag, String name, Class generator, Class headerGenerator)
language - the target language enum value.optionFlag - command line option flag for this
language.name - language print name.generator - code generator class.headerGenerator - header code generator class.public boolean equals(Object o)
true if o is a
Language instance referencing the same
TargetLanguage.public int hashCode()
TargetLanguage ordinal value as
the hash code.public String toString()
public TargetLanguage language()
TargetLanguage.TargetLanguage.public String optionFlag()
public String name()
public SmcCodeGenerator generator(SmcOptions options)
options - SMC command line options.public boolean hasHeaderFile()
true if this language uses header
files.true if language has headers.public SmcCodeGenerator headerGenerator(SmcOptions options)
options - SMC command line options.Copyright © 2019. All rights reserved.