Class Mapping<K>
java.lang.Object
tools.mdsd.jamopp.printer.implementation.Mapping<K>
- Type Parameters:
K
- Ensures, that the printer can print an instance of the class.
Maps a class to a printer. The printer must be able to print an instance of
this class. The idea is, that you put a set of mappings in a list, iterate
through the list and only print an element, if it is an instance of the
class. See e.g.
StatementPrinterImpl
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
checkAndPrint
(EObject element, BufferedWriter writer) Prints the element in the buffered writer, if the element is an instance of clazz.
-
Constructor Details
-
Mapping
-
-
Method Details
-
checkAndPrint
Prints the element in the buffered writer, if the element is an instance of clazz.- Parameters:
element
- Element to printwriter
- Writer in which to print- Returns:
- true, if something was printed, otherwise else
- Throws:
IOException
- if the printer throws an IOException while printing
-