Mercurial > hg > graal-jvmci-8
view graal/com.oracle.truffle.ruby.runtime/src/com/oracle/truffle/ruby/runtime/configuration/Configuration.java @ 13563:fb846424299f
Truffle/Ruby: extend Instrumentation framework with language-agnostic interfaces for access to AST printing utilities and a Ruby implementation
author | Michael Van De Vanter <michael.van.de.vanter@oracle.com> |
---|---|
date | Tue, 07 Jan 2014 18:09:42 -0800 |
parents | 0fbee3eb71f0 |
children | 497fada09efb |
line wrap: on
line source
/* * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. This * code is released under a tri EPL/GPL/LGPL license. You can use it, * redistribute it and/or modify it under the terms of the: * * Eclipse Public License version 1.0 * GNU General Public License version 2 * GNU Lesser General Public License version 2.1 */ package com.oracle.truffle.ruby.runtime.configuration; import java.io.*; import com.oracle.truffle.ruby.runtime.*; /** * Configurable, immutable global parameters for Ruby. */ public class Configuration { private final String standardLibrary; private final RubyVersion rubyVersion; private final boolean verbose; private final int warningLevel; private final int taintCheckLevel; private final String defaultExternalEncoding; private final String defaultInternalEncoding; private final boolean debug; private final boolean trace; private final boolean fullObjectSpace; private final boolean printParseTree; private final boolean printExecutedFiles; private final boolean printSpiltInstanceVariables; private final boolean printUninitializedCalls; private final boolean printJavaExceptions; private final boolean printRubyExceptions; private final PrintStream standardOut; private final InputReader inputReader; public Configuration(ConfigurationBuilder builder) { assert builder != null; standardLibrary = builder.getStandardLibrary(); rubyVersion = builder.getRubyVersion(); verbose = builder.getVerbose(); warningLevel = builder.getWarningLevel(); taintCheckLevel = builder.getTaintCheckLevel(); defaultExternalEncoding = builder.getDefaultExternalEncoding(); defaultInternalEncoding = builder.getDefaultInternalEncoding(); debug = builder.getDebug(); trace = builder.getTrace(); fullObjectSpace = builder.getFullObjectSpace(); printParseTree = builder.getPrintParseTree(); printExecutedFiles = builder.getPrintExecutedFiles(); printSpiltInstanceVariables = builder.getPrintSpiltInstanceVariables(); printUninitializedCalls = builder.getPrintUninitializedCalls(); printJavaExceptions = builder.getPrintJavaExceptions(); printRubyExceptions = builder.getPrintRubyExceptions(); standardOut = builder.getStandardOut(); inputReader = builder.getInputReader(); } public String getStandardLibrary() { return standardLibrary; } public RubyVersion getRubyVersion() { return rubyVersion; } public boolean getDebug() { return debug; } public boolean getVerbose() { return verbose; } public int getWarningLevel() { return warningLevel; } public int getTaintCheckLevel() { return taintCheckLevel; } public String getDefaultExternalEncoding() { return defaultExternalEncoding; } public String getDefaultInternalEncoding() { return defaultInternalEncoding; } public boolean getTrace() { return trace; } public boolean getFullObjectSpace() { return fullObjectSpace; } public boolean getPrintParseTree() { return printParseTree; } public boolean getPrintExecutedFiles() { return printExecutedFiles; } public boolean getPrintSpiltInstanceVariables() { return printSpiltInstanceVariables; } public boolean getPrintUninitializedCalls() { return printUninitializedCalls; } public boolean getPrintJavaExceptions() { return printJavaExceptions; } public boolean getPrintRubyExceptions() { return printRubyExceptions; } public PrintStream getStandardOut() { return standardOut; } public InputReader getInputReader() { return inputReader; } }