Java Code Examples for jdk.nashorn.internal.runtime.Context#getLogger()

The following examples show how to use jdk.nashorn.internal.runtime.Context#getLogger() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JSONWriter.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns AST as JSON compatible string.
 *
 * @param context context
 * @param code code to be parsed
 * @param name name of the code source (used for location)
 * @param includeLoc tells whether to include location information for nodes or not
 * @return JSON string representation of AST of the supplied code
 */
public static String parse(final Context context, final String code, final String name, final boolean includeLoc) {
    final Parser       parser     = new Parser(context.getEnv(), sourceFor(name, code), new Context.ThrowErrorManager(), context.getEnv()._strict, context.getLogger(Parser.class));
    final JSONWriter   jsonWriter = new JSONWriter(includeLoc);
    try {
        final FunctionNode functionNode = parser.parse(); //symbol name is ":program", default
        functionNode.accept(jsonWriter);
        return jsonWriter.getString();
    } catch (final ParserException e) {
        e.throwAsEcmaException();
        return null;
    }
}
 
Example 2
Source File: AssignSymbols.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
@Override
public DebugLogger initLogger(final Context context) {
    return context.getLogger(this.getClass());
}
 
Example 3
Source File: Parser.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public DebugLogger initLogger(final Context context) {
    return context.getLogger(this.getClass());
}
 
Example 4
Source File: FoldConstants.java    From jdk8u_nashorn with GNU General Public License v2.0 4 votes vote down vote up
@Override
public DebugLogger initLogger(final Context context) {
    return context.getLogger(this.getClass());
}
 
Example 5
Source File: Splitter.java    From jdk8u_nashorn with GNU General Public License v2.0 4 votes vote down vote up
@Override
public DebugLogger initLogger(final Context context) {
    return context.getLogger(this.getClass());
}
 
Example 6
Source File: ObjectClassGenerator.java    From jdk8u_nashorn with GNU General Public License v2.0 4 votes vote down vote up
@Override
public DebugLogger initLogger(final Context ctxt) {
    return ctxt.getLogger(this.getClass());
}
 
Example 7
Source File: FoldConstants.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public DebugLogger initLogger(final Context context) {
    return context.getLogger(this.getClass());
}
 
Example 8
Source File: AssignSymbols.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public DebugLogger initLogger(final Context context) {
    return context.getLogger(this.getClass());
}
 
Example 9
Source File: AssignSymbols.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
@Override
public DebugLogger initLogger(final Context context) {
    return context.getLogger(this.getClass());
}
 
Example 10
Source File: FoldConstants.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
@Override
public DebugLogger initLogger(final Context context) {
    return context.getLogger(this.getClass());
}
 
Example 11
Source File: Parser.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public DebugLogger initLogger(final Context context) {
    return context.getLogger(this.getClass());
}
 
Example 12
Source File: FoldConstants.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public DebugLogger initLogger(final Context context) {
    return context.getLogger(this.getClass());
}
 
Example 13
Source File: ApplySpecialization.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public DebugLogger initLogger(final Context context) {
    return context.getLogger(this.getClass());
}
 
Example 14
Source File: ObjectClassGenerator.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
@Override
public DebugLogger initLogger(final Context ctxt) {
    return ctxt.getLogger(this.getClass());
}
 
Example 15
Source File: FindScopeDepths.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
@Override
public DebugLogger initLogger(final Context context) {
    return context.getLogger(this.getClass());
}
 
Example 16
Source File: FindScopeDepths.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
@Override
public DebugLogger initLogger(final Context context) {
    return context.getLogger(this.getClass());
}
 
Example 17
Source File: FindScopeDepths.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
@Override
public DebugLogger initLogger(final Context context) {
    return context.getLogger(this.getClass());
}
 
Example 18
Source File: Parser.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
@Override
public DebugLogger initLogger(final Context context) {
    return context.getLogger(this.getClass());
}
 
Example 19
Source File: Lower.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
@Override
public DebugLogger initLogger(final Context context) {
    return context.getLogger(this.getClass());
}
 
Example 20
Source File: Lower.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
@Override
public DebugLogger initLogger(final Context context) {
    return context.getLogger(this.getClass());
}