本文整理了Java中org.mozilla.javascript.tools.shell.Global.getOut()
方法的一些代码示例,展示了Global.getOut()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Global.getOut()
方法的具体详情如下:
包路径:org.mozilla.javascript.tools.shell.Global
类名称:Global
方法名:getOut
暂无
代码示例来源:origin: com.github.tntim96/rhino
public static PrintStream getOut() {
return getGlobal().getOut();
}
代码示例来源:origin: org.jvnet.hudson/embedded-rhino-debugger
public static PrintStream getOut() {
return getGlobal().getOut();
}
代码示例来源:origin: ro.isdc.wro4j/rhino
public static PrintStream getOut() {
return getGlobal().getOut();
}
代码示例来源:origin: com.github.tntim96/rhino
/**
* Print a help message.
*
* This method is defined as a JavaScript function.
*/
public static void help(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
PrintStream out = getInstance(funObj).getOut();
out.println(ToolErrorReporter.getMessage("msg.help"));
}
代码示例来源:origin: org.jvnet.hudson/embedded-rhino-debugger
/**
* Print a help message.
*
* This method is defined as a JavaScript function.
*/
public static void help(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
PrintStream out = getInstance(funObj).getOut();
out.println(ToolErrorReporter.getMessage("msg.help"));
}
代码示例来源:origin: ro.isdc.wro4j/rhino
/**
* Print a help message.
*
* This method is defined as a JavaScript function.
*/
public static void help(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
PrintStream out = getInstance(funObj).getOut();
out.println(ToolErrorReporter.getMessage("msg.help"));
}
代码示例来源:origin: ro.isdc.wro4j/rhino
/**
* Print the string values of its arguments.
*
* This method is defined as a JavaScript function.
* Note that its arguments are of the "varargs" form, which
* allows it to handle an arbitrary number of arguments
* supplied to the JavaScript function.
*
*/
public static Object print(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
PrintStream out = getInstance(funObj).getOut();
for (int i=0; i < args.length; i++) {
if (i > 0)
out.print(" ");
// Convert the arbitrary JavaScript value into a string form.
String s = Context.toString(args[i]);
out.print(s);
}
out.println();
return Context.getUndefinedValue();
}
代码示例来源:origin: com.github.tntim96/rhino
/**
* Print the string values of its arguments.
*
* This method is defined as a JavaScript function.
* Note that its arguments are of the "varargs" form, which
* allows it to handle an arbitrary number of arguments
* supplied to the JavaScript function.
*
*/
public static Object print(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
PrintStream out = getInstance(funObj).getOut();
for (int i=0; i < args.length; i++) {
if (i > 0)
out.print(" ");
// Convert the arbitrary JavaScript value into a string form.
String s = Context.toString(args[i]);
out.print(s);
}
out.println();
return Context.getUndefinedValue();
}
代码示例来源:origin: org.jvnet.hudson/embedded-rhino-debugger
/**
* Print the string values of its arguments.
*
* This method is defined as a JavaScript function.
* Note that its arguments are of the "varargs" form, which
* allows it to handle an arbitrary number of arguments
* supplied to the JavaScript function.
*
*/
public static Object print(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
{
PrintStream out = getInstance(funObj).getOut();
for (int i=0; i < args.length; i++) {
if (i > 0)
out.print(" ");
// Convert the arbitrary JavaScript value into a string form.
String s = Context.toString(args[i]);
out.print(s);
}
out.println();
return Context.getUndefinedValue();
}
代码示例来源:origin: org.dojotoolkit/dojo-shrinksafe
static void processFiles(Context cx, String[] files) throws IOException {
StringBuffer cout = new StringBuffer();
if (files.length > 0) {
for (int i=0; i < files.length; i++) {
try {
String source = (String)readFileOrUrl(files[i], true);
cout.append(Compressor.compressScript(source, 0, 1, escapeUnicode, stripConsole));
} catch(IOException ex) {
// continue processing files
}
}
} else {
byte[] data = Kit.readStream(global.getIn(), 4096);
// Convert to String using the default encoding
String source = new String(data);
if (source != null) {
cout.append(Compressor.compressScript(source, 0, 1, escapeUnicode, stripConsole));
}
}
global.getOut().println(cout);
}
代码示例来源:origin: org.dojotoolkit/dojo-shrinksafe
global.getOut().println(getMessage("msg.shell.invalid", usageError));
global.getOut().println(getMessage("msg.shell.usage"));
System.exit(1);
代码示例来源:origin: com.github.tntim96/rhino
arg.equals("-help")) {
global.getOut().println(
ToolErrorReporter.getMessage("msg.shell.usage", Main.class.getName()));
System.exit(1);
global.getOut().println(
ToolErrorReporter.getMessage("msg.shell.invalid", usageError));
global.getOut().println(
ToolErrorReporter.getMessage("msg.shell.usage", Main.class.getName()));
System.exit(1);
代码示例来源:origin: ro.isdc.wro4j/rhino
i++;
PrintStream savedOut = this.getOut();
PrintStream savedErr = this.getErr();
ByteArrayOutputStream out = new ByteArrayOutputStream();
代码示例来源:origin: com.github.tntim96/rhino
i++;
PrintStream savedOut = this.getOut();
PrintStream savedErr = this.getErr();
ByteArrayOutputStream out = new ByteArrayOutputStream();
代码示例来源:origin: ro.isdc.wro4j/rhino
arg.equals("-help")) {
global.getOut().println(
ToolErrorReporter.getMessage("msg.shell.usage", Main.class.getName()));
System.exit(1);
global.getOut().println(
ToolErrorReporter.getMessage("msg.shell.invalid", usageError));
global.getOut().println(
ToolErrorReporter.getMessage("msg.shell.usage", Main.class.getName()));
System.exit(1);
代码示例来源:origin: org.jvnet.hudson/embedded-rhino-debugger
i++;
PrintStream savedOut = this.getOut();
PrintStream savedErr = this.getErr();
ByteArrayOutputStream out = new ByteArrayOutputStream();
代码示例来源:origin: org.jvnet.hudson/embedded-rhino-debugger
arg.equals("-help")) {
global.getOut().println(
ToolErrorReporter.getMessage("msg.shell.usage", Main.class.getName()));
System.exit(1);
global.getOut().println(
ToolErrorReporter.getMessage("msg.shell.invalid", usageError));
global.getOut().println(
ToolErrorReporter.getMessage("msg.shell.usage", Main.class.getName()));
System.exit(1);
代码示例来源:origin: com.github.tntim96/rhino
out = (global != null) ? global.getOut() : System.out;
代码示例来源:origin: org.jvnet.hudson/embedded-rhino-debugger
out = (global != null) ? global.getOut() : System.out;
代码示例来源:origin: ro.isdc.wro4j/rhino
out = (global != null) ? global.getOut() : System.out;
内容来源于网络,如有侵权,请联系作者删除!