Java Code Examples for jdk.nashorn.internal.runtime.logging.DebugLogger#DISABLED_LOGGER

The following examples show how to use jdk.nashorn.internal.runtime.logging.DebugLogger#DISABLED_LOGGER . 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: Parser.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Construct a parser.
 *
 * @param env     script environment
 * @param source  source to parse
 * @param errors  error manager
 * @param strict  parser created with strict mode enabled.
 * @param lineOffset line offset to start counting lines from
 * @param log debug logger if one is needed
 */
public Parser(final ScriptEnvironment env, final Source source, final ErrorManager errors, final boolean strict, final int lineOffset, final DebugLogger log) {
    super(source, errors, strict, lineOffset);
    this.env = env;
    this.namespace = new Namespace(env.getNamespace());
    this.scripting = env._scripting;
    if (this.scripting) {
        this.lineInfoReceiver = new Lexer.LineInfoReceiver() {
            @Override
            public void lineInfo(final int receiverLine, final int receiverLinePosition) {
                // update the parser maintained line information
                Parser.this.line = receiverLine;
                Parser.this.linePosition = receiverLinePosition;
            }
        };
    } else {
        // non-scripting mode script can't have multi-line literals
        this.lineInfoReceiver = null;
    }

    this.log = log == null ? DebugLogger.DISABLED_LOGGER : log;
}
 
Example 2
Source File: Parser.java    From jdk8u_nashorn with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Construct a parser.
 *
 * @param env     script environment
 * @param source  source to parse
 * @param errors  error manager
 * @param strict  parser created with strict mode enabled.
 * @param lineOffset line offset to start counting lines from
 * @param log debug logger if one is needed
 */
public Parser(final ScriptEnvironment env, final Source source, final ErrorManager errors, final boolean strict, final int lineOffset, final DebugLogger log) {
    super(source, errors, strict, lineOffset);
    this.env = env;
    this.namespace = new Namespace(env.getNamespace());
    this.scripting = env._scripting;
    if (this.scripting) {
        this.lineInfoReceiver = new Lexer.LineInfoReceiver() {
            @Override
            public void lineInfo(final int receiverLine, final int receiverLinePosition) {
                // update the parser maintained line information
                Parser.this.line = receiverLine;
                Parser.this.linePosition = receiverLinePosition;
            }
        };
    } else {
        // non-scripting mode script can't have multi-line literals
        this.lineInfoReceiver = null;
    }

    this.log = log == null ? DebugLogger.DISABLED_LOGGER : log;
}
 
Example 3
Source File: Parser.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Construct a parser.
 *
 * @param env     script environment
 * @param source  source to parse
 * @param errors  error manager
 * @param strict  parser created with strict mode enabled.
 * @param lineOffset line offset to start counting lines from
 * @param log debug logger if one is needed
 */
public Parser(final ScriptEnvironment env, final Source source, final ErrorManager errors, final boolean strict, final int lineOffset, final DebugLogger log) {
    super(source, errors, strict, lineOffset);
    this.env = env;
    this.namespace = new Namespace(env.getNamespace());
    this.scripting = env._scripting;
    if (this.scripting) {
        this.lineInfoReceiver = new Lexer.LineInfoReceiver() {
            @Override
            public void lineInfo(final int receiverLine, final int receiverLinePosition) {
                // update the parser maintained line information
                Parser.this.line = receiverLine;
                Parser.this.linePosition = receiverLinePosition;
            }
        };
    } else {
        // non-scripting mode script can't have multi-line literals
        this.lineInfoReceiver = null;
    }

    this.log = log == null ? DebugLogger.DISABLED_LOGGER : log;
}
 
Example 4
Source File: Parser.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Construct a parser.
 *
 * @param env     script environment
 * @param source  source to parse
 * @param errors  error manager
 * @param strict  parser created with strict mode enabled.
 * @param lineOffset line offset to start counting lines from
 * @param log debug logger if one is needed
 */
public Parser(final ScriptEnvironment env, final Source source, final ErrorManager errors, final boolean strict, final int lineOffset, final DebugLogger log) {
    super(source, errors, strict, lineOffset);
    this.env = env;
    this.namespace = new Namespace(env.getNamespace());
    this.scripting = env._scripting;
    if (this.scripting) {
        this.lineInfoReceiver = new Lexer.LineInfoReceiver() {
            @Override
            public void lineInfo(final int receiverLine, final int receiverLinePosition) {
                // update the parser maintained line information
                Parser.this.line = receiverLine;
                Parser.this.linePosition = receiverLinePosition;
            }
        };
    } else {
        // non-scripting mode script can't have multi-line literals
        this.lineInfoReceiver = null;
    }

    this.log = log == null ? DebugLogger.DISABLED_LOGGER : log;
}
 
Example 5
Source File: OptimisticTypesPersistence.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private static DebugLogger getLogger() {
    try {
        return Context.getContext().getLogger(RecompilableScriptFunctionData.class);
    } catch (final Exception e) {
        e.printStackTrace();
        return DebugLogger.DISABLED_LOGGER;
    }
}
 
Example 6
Source File: OptimisticTypesPersistence.java    From jdk8u_nashorn with GNU General Public License v2.0 5 votes vote down vote up
private static DebugLogger getLogger() {
    try {
        return Context.getContext().getLogger(RecompilableScriptFunctionData.class);
    } catch (final Exception e) {
        e.printStackTrace();
        return DebugLogger.DISABLED_LOGGER;
    }
}
 
Example 7
Source File: OptimisticTypesPersistence.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private static DebugLogger getLogger() {
    try {
        return Context.getContext().getLogger(RecompilableScriptFunctionData.class);
    } catch (final Exception e) {
        e.printStackTrace();
        return DebugLogger.DISABLED_LOGGER;
    }
}
 
Example 8
Source File: OptimisticTypesPersistence.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private static DebugLogger getLogger() {
    try {
        return Context.getContext().getLogger(RecompilableScriptFunctionData.class);
    } catch (final Exception e) {
        e.printStackTrace();
        return DebugLogger.DISABLED_LOGGER;
    }
}
 
Example 9
Source File: OptimisticTypesPersistence.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private static DebugLogger getLogger() {
    try {
        return Context.getContext().getLogger(RecompilableScriptFunctionData.class);
    } catch (final Exception e) {
        e.printStackTrace();
        return DebugLogger.DISABLED_LOGGER;
    }
}
 
Example 10
Source File: OptimisticTypesPersistence.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private static DebugLogger getLogger() {
    try {
        return Context.getContext().getLogger(RecompilableScriptFunctionData.class);
    } catch (final Exception e) {
        e.printStackTrace();
        return DebugLogger.DISABLED_LOGGER;
    }
}
 
Example 11
Source File: CompiledFunction.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
CompiledFunction(final MethodHandle invoker, final MethodHandle constructor, final Specialization specialization) {
    this(invoker, constructor, 0, null, specialization, DebugLogger.DISABLED_LOGGER);
}
 
Example 12
Source File: GlobalConstants.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public DebugLogger initLogger(final Context context) {
    return DebugLogger.DISABLED_LOGGER;
}
 
Example 13
Source File: GlobalConstants.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
@Override
public DebugLogger initLogger(final Context context) {
    return DebugLogger.DISABLED_LOGGER;
}
 
Example 14
Source File: CompiledFunction.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
CompiledFunction(final MethodHandle invoker, final MethodHandle constructor, final Specialization specialization) {
    this(invoker, constructor, 0, null, specialization, DebugLogger.DISABLED_LOGGER);
}
 
Example 15
Source File: GlobalConstants.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 DebugLogger.DISABLED_LOGGER;
}
 
Example 16
Source File: CompiledFunction.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
CompiledFunction(final MethodHandle invoker, final MethodHandle constructor, final Specialization specialization) {
    this(invoker, constructor, 0, null, specialization, DebugLogger.DISABLED_LOGGER);
}
 
Example 17
Source File: CompiledFunction.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
CompiledFunction(final MethodHandle invoker, final MethodHandle constructor, final Specialization specialization) {
    this(invoker, constructor, 0, null, specialization, DebugLogger.DISABLED_LOGGER);
}
 
Example 18
Source File: GlobalConstants.java    From jdk8u60 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Constructor - used only by global
 * @param log logger, or null if none
 */
public GlobalConstants(final DebugLogger log) {
    this.log = log == null ? DebugLogger.DISABLED_LOGGER : log;
}
 
Example 19
Source File: GlobalConstants.java    From hottub with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Constructor - used only by global
 * @param log logger, or null if none
 */
public GlobalConstants(final DebugLogger log) {
    this.log = log == null ? DebugLogger.DISABLED_LOGGER : log;
}
 
Example 20
Source File: GlobalConstants.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Constructor - used only by global
 * @param log logger, or null if none
 */
public GlobalConstants(final DebugLogger log) {
    this.log = log == null ? DebugLogger.DISABLED_LOGGER : log;
}