001 /*
002 * Copyright 2010-2013 JetBrains s.r.o.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016
017 package org.jetbrains.jet.cli.jvm.repl;
018
019 import org.jetbrains.annotations.NotNull;
020 import org.jetbrains.jet.lang.descriptors.ScriptDescriptor;
021 import org.jetbrains.jet.lang.resolve.java.JvmClassName;
022
023 public class EarlierLine {
024 @NotNull
025 private final String code;
026 @NotNull
027 private final ScriptDescriptor scriptDescriptor;
028 @NotNull
029 private final Class<?> scriptClass;
030 @NotNull
031 private final Object scriptInstance;
032 @NotNull
033 private final JvmClassName className;
034
035 public EarlierLine(@NotNull String code, @NotNull ScriptDescriptor scriptDescriptor, @NotNull Class<?> scriptClass, @NotNull Object scriptInstance, @NotNull JvmClassName className) {
036 this.code = code;
037 this.scriptDescriptor = scriptDescriptor;
038 this.scriptClass = scriptClass;
039 this.scriptInstance = scriptInstance;
040 this.className = className;
041 }
042
043 @NotNull
044 public String getCode() {
045 return code;
046 }
047
048 @NotNull
049 public ScriptDescriptor getScriptDescriptor() {
050 return scriptDescriptor;
051 }
052
053 @NotNull
054 public Class<?> getScriptClass() {
055 return scriptClass;
056 }
057
058 @NotNull
059 public Object getScriptInstance() {
060 return scriptInstance;
061 }
062
063 @NotNull
064 public JvmClassName getClassName() {
065 return className;
066 }
067 }