org.eclipse.xtext.xbase.lib
Class InputOutput

java.lang.Object
  extended by org.eclipse.xtext.xbase.lib.InputOutput

@GwtCompatible
public class InputOutput
extends Object

Utilities to print information to the console.

Author:
Sven Efftinge - Initial contribution and API

Constructor Summary
InputOutput()
           
 
Method Summary
static
<T> T
print(T o)
          Prints the given object to System.out.
static void println()
          Prints a newline to standard out, by delegating directly to System.out.println()
static
<T> T
println(T object)
          Prints the given object to System.out and terminate the line.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InputOutput

public InputOutput()
Method Detail

println

public static void println()
Prints a newline to standard out, by delegating directly to System.out.println()

Since:
2.3

println

public static <T> T println(T object)
Prints the given object to System.out and terminate the line. Useful to log partial expressions to trap errors, e.g. the following is possible: println(1 + println(2)) + 3

Parameters:
object - the to-be-printed object
Returns:
the printed object.

print

public static <T> T print(T o)
Prints the given object to System.out. Useful to log partial expressions to trap errors, e.g. the following is possible: 1 + print(2) + 3

Parameters:
o - the to-be-printed object
Returns:
the printed object.


Copyright © 2013. All Rights Reserved.