001 /*
002 * Copyright 2010-2014 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.common.arguments;
018
019 import com.sampullara.cli.Argument;
020 import org.jetbrains.annotations.NotNull;
021
022 /**
023 * Command line arguments for K2JVMCompiler
024 */
025 @SuppressWarnings("UnusedDeclaration")
026 public class K2JVMCompilerArguments extends CommonCompilerArguments {
027 @Argument(value = "d", description = "Destination for generated class files")
028 @ValueDescription("<directory|jar>")
029 public String destination;
030
031 @Argument(value = "classpath", description = "Paths where to find user class files")
032 @ValueDescription("<path>")
033 public String classpath;
034
035 @Argument(value = "annotations", description = "Paths to external annotations")
036 @ValueDescription("<path>")
037 public String annotations;
038
039 @Argument(value = "includeRuntime", description = "Include Kotlin runtime in to resulting .jar")
040 public boolean includeRuntime;
041
042 @Argument(value = "noJdk", description = "Don't include Java runtime into classpath")
043 public boolean noJdk;
044
045 @Argument(value = "noStdlib", description = "Don't include Kotlin runtime into classpath")
046 public boolean noStdlib;
047
048 @Argument(value = "noJdkAnnotations", description = "Don't include JDK external annotations into classpath")
049 public boolean noJdkAnnotations;
050
051 @Argument(value = "notNullAssertions", description = "Generate not-null assertion after each invocation of method returning not-null")
052 public boolean notNullAssertions;
053
054 @Argument(value = "notNullParamAssertions", description = "Generate not-null assertions on parameters of methods accessible from Java")
055 public boolean notNullParamAssertions;
056
057 @Argument(value = "module", description = "Path to the module file to compile")
058 @ValueDescription("<path>")
059 public String module;
060
061 @Argument(value = "script", description = "Evaluate the script file")
062 public boolean script;
063
064 @Argument(value = "kotlinHome", description = "Path to Kotlin compiler home directory, used for annotations and runtime libraries discovery")
065 @ValueDescription("<path>")
066 public String kotlinHome;
067
068 @Argument(value = "inline", description = "Inlining mode (default is on)")
069 @ValueDescription("{on,off}")
070 public String inline;
071
072 @Argument(value = "optimize", description = "Optimization mode (default is on)")
073 @ValueDescription("{on,off}")
074 public String optimize;
075
076 @Override
077 @NotNull
078 public String executableScriptFileName() {
079 return "kotlinc-jvm";
080 }
081 }