blob: 0b06531843bfef19391d24908618cadd16e531c4 [file] [log] [blame]
// ****************************************************************************
// *** Xtend stdlib extensions: io
// *** ------------------------------------------------------------------------
// *** This library contains functions for dumping objects to the console or
// *** to stderr.
// ****************************************************************************
private Void internalSyserr(Object s) :
JAVA org.eclipse.xtend.util.stdlib.IOExtensions.syserr(java.lang.Object);
private Void internalSyserr(Object s, String prefix) :
JAVA org.eclipse.xtend.util.stdlib.IOExtensions.syserr(java.lang.Object, java.lang.String);
private Void internalDebug(Object s) :
JAVA org.eclipse.xtend.util.stdlib.IOExtensions.debug(java.lang.Object);
private Void internalInfo(Object s) :
JAVA org.eclipse.xtend.util.stdlib.IOExtensions.info(java.lang.Object);
private Void internalError(Object s) :
JAVA org.eclipse.xtend.util.stdlib.IOExtensions.error(java.lang.Object);
private Void internalThrowError(Object s) :
JAVA org.eclipse.xtend.util.stdlib.IOExtensions.throwError(java.lang.Object);
private String internalIncludeFile(String filePath, String encoding) :
JAVA org.eclipse.xtend.util.stdlib.IOExtensions.includeFile(java.lang.String,java.lang.String);
/**
* Prints an Object to stderr with a prefix string.
* @param o The object that should be printed. null is allowed.
* @param prefix A prefix string for the message.
*/
syserr(Object o) :
internalSyserr(o) -> o;
/**
* Prints an Object to stderr with a prefix string.
* @param o The object that should be printed. null is allowed.
* @param prefix A prefix string for the message.
*/
syserr(Object o, String prefix) :
internalSyserr(o, prefix) -> o;
/**
* Logs an object with DEBUG level to the logger.
* @param o The object to dump.
* @return The object o
*/
debug(Object o) :
internalDebug(o) -> o;
/**
* Logs an object with INFO level to the logger.
* @param o The object to dump.
* @return The object o
*/
info(Object o) :
internalInfo(o) -> o;
/**
* Logs an object with ERROR level to the logger.
* @param o The object to dump.
* @return The object o
*/
error(Object o) :
internalError(o) -> o;
/**
* Throws an IllegalStateMessage.
* @param o The exception message
* @return Nothing, since an exception is thrown.
*/
throwError(Object o) :
internalThrowError(o) -> o;
/**
* Reads the content of a file.
* @param filePath Path to the file
* @param encoding File encoding to use for reading
* @return File content
*/
String includeFile (String filePath, String encoding) :
internalIncludeFile(filePath,encoding);
/**
* Reads the content of a file.
* @param filePath Path to the file
* @return File content
*/
String includeFile (String filePath) :
internalIncludeFile(filePath,null);