JkJavaCompileSpec implements Cloneable { public JkJavaCompileSpec<T> setSourceVersion(JkJavaVersion version) { if (version == null) { return this; } return setOption(SOURCE_OPTS, version.get()); } private  JkJavaCompileSpec(T __); static JkJavaCompileSpec<Void> of(); static JkJavaCompileSpec<T> ofParent(T o); JkJavaCompileSpec<T> clone(); List<String> getOptions(); Path getOutputDir(); JkJavaCompileSpec<T> setOutputDir(Path outputDir); JkJavaVersion getSourceVersion(); JkJavaVersion getTargetVersion(); JkJavaCompileSpec<T> setSourceVersion(JkJavaVersion version); JkJavaCompileSpec<T> setTargetVersion(JkJavaVersion version); JkJavaCompileSpec<T> setSourceAndTargetVersion(JkJavaVersion version); String getEncoding(); JkJavaCompileSpec<T> setEncoding(String encoding); JkJavaCompileSpec<T> addSources(Iterable<Path> paths); JkJavaCompileSpec<T> addSources(JkPathTree tree); JkJavaCompileSpec<T> addSources(JkPathTreeSet treeSet); JkJavaCompileSpec<T> addSources(Path path1, Path path2, Path... files); List<Path> getSourceFiles(); JkJavaCompileSpec<T> setClasspath(Iterable<Path> files); JkJavaCompileSpec<T> addOptions(String... options); JkJavaCompileSpec<T> addOptions(Iterable<String> options); JkJavaCompileSpec<T> setOption(String optionName, String optionValue); JkJavaCompileSpec<T> setAnnotationProcessors(String... annotationProcessorClassNames); JkJavaCompileSpec<T> disableAnnotationProcessing(); JkJavaCompileSpec<T> setAnnotationProcessingOnly(); String getNextValue(String optionName); static final String SOURCE_OPTS; static final String TARGET_OPTS; static final String PROCESSOR_OPTS; static  final String ENCODING_OPTS; final T __; }
@Test public void setSourceVersion() { JkJavaCompileSpec spec = JkJavaCompileSpec.of(); spec.setSourceVersion(JkJavaVersion.V8); spec.setSourceVersion(JkJavaVersion.V8); assertEquals(2, spec.getOptions().size()); }