001 /**
002 *
003 * Licensed to the Apache Software Foundation (ASF) under one or more
004 * contributor license agreements. See the NOTICE file distributed with
005 * this work for additional information regarding copyright ownership.
006 * The ASF licenses this file to You under the Apache License, Version 2.0
007 * (the "License"); you may not use this file except in compliance with
008 * the License. You may obtain a copy of the License at
009 *
010 * http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018
019 package org.jetbrains.jet.cli.common.arguments;
020
021 import com.sampullara.cli.Argument;
022 import org.jetbrains.annotations.NotNull;
023
024 /**
025 * Command line arguments for K2JVMCompiler
026 */
027 @SuppressWarnings("UnusedDeclaration")
028 public class K2JVMCompilerArguments extends CommonCompilerArguments {
029 @Argument(value = "src", description = "Source file or directory (allows many paths separated by the system path separator)")
030 @ValueDescription("<path>")
031 public String src;
032
033 @Argument(value = "jar", description = "Resulting .jar file path")
034 @ValueDescription("<path>")
035 public String jar;
036
037 @Argument(value = "output", description = "Output directory path for .class files")
038 @ValueDescription("<path>")
039 public String outputDir;
040
041 @Argument(value = "classpath", description = "Paths where to find user class files")
042 @ValueDescription("<path>")
043 public String classpath;
044
045 @Argument(value = "annotations", description = "Paths to external annotations")
046 @ValueDescription("<path>")
047 public String annotations;
048
049 @Argument(value = "includeRuntime", description = "Include Kotlin runtime in to resulting .jar")
050 public boolean includeRuntime;
051
052 @Argument(value = "noJdk", description = "Don't include Java runtime into classpath")
053 public boolean noJdk;
054
055 @Argument(value = "noStdlib", description = "Don't include Kotlin runtime into classpath")
056 public boolean noStdlib;
057
058 @Argument(value = "noJdkAnnotations", description = "Don't include JDK external annotations into classpath")
059 public boolean noJdkAnnotations;
060
061 @Argument(value = "notNullAssertions", description = "Generate not-null assertion after each invocation of method returning not-null")
062 public boolean notNullAssertions;
063
064 @Argument(value = "notNullParamAssertions", description = "Generate not-null assertions on parameters of methods accessible from Java")
065 public boolean notNullParamAssertions;
066
067 @Argument(value = "module", description = "Path to the module file to compile")
068 @ValueDescription("<path>")
069 public String module;
070
071 @Argument(value = "script", description = "Evaluate the script file")
072 public boolean script;
073
074 @Argument(value = "kotlinHome", description = "Path to Kotlin compiler home directory, used for annotations and runtime libraries discovery")
075 @ValueDescription("<path>")
076 public String kotlinHome;
077
078 @Argument(value = "inline", description = "Inlining mode (default is on)")
079 @ValueDescription("{on,off}")
080 public String inline;
081
082 @Override
083 @NotNull
084 public String executableScriptFileName() {
085 return "kotlinc-jvm";
086 }
087 }