public class PrintModelElement extends Object implements Function<Object,String>
Usage: System.err.println( "model element ="+ new ModelElementPrinter().execute( modelElement ) );
| Constructor and Description |
|---|
PrintModelElement() |
PrintModelElement(String prefix)
The only constructor of ModelElementPrinter is to wrap up a non-null model element to print.
|
| Modifier and Type | Method and Description |
|---|---|
String |
execute(Object object)
Prints the elements nested according to the prefix
|
Object |
toPrint(Object wrapped) |
public PrintModelElement()
public PrintModelElement(String prefix)
prefix - to all linespublic String execute(Object object) throws RuntimeException, IllegalArgumentException
execute in interface Function<Object,String>object - the model element to printRuntimeExceptionIllegalArgumentExceptionCopyright © 2001–2018 MDA Tools. All rights reserved.