/*
 * Copyright 2011 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.gradle.tooling.model.build;

import org.gradle.api.Incubating;

import java.io.File;
import java.util.List;
import java.util.Map;

/**
 * Informs about the Java environment, for example the Java home or the JVM args used.
 * See example in {@link BuildEnvironment}.
 *
 * @since 1.0-milestone-8
 */
public interface JavaEnvironment {

    /**
     * The Java home used for Gradle operations (for example running tasks or acquiring model information).
     *
     * @since 1.0-milestone-8
     */
    File getJavaHome();

    /**
     * The JVM arguments the user has provided to start the Java process that handles Gradle operations
     * (for example running tasks or acquiring model information).
     * The returned arguments do not include system properties passed as -Dfoo=bar.
     * They may include extra properties added by default if no user jvm arguments are specified,
     * like those required by the Gradle daemon (eg. MaxPermSize).
     *
     * @since 1.0-milestone-8
     */
    List<String> getJvmArguments();

    /**
     * The effective JVM arguments used to start the Java process that handles Gradle operations
     * (for example running tasks or acquiring model information).
     * The returned arguments do not include system properties passed as -Dfoo=bar.
     * They may include implicitly immutable system properties like "file.encoding".
     *
     * @since 2.5
     */
    @Incubating
    List<String> getEffectiveJvmArguments();

    /**
     * The effective JVM arguments used to start the Java process that handles Gradle operations
     * (for example running tasks or acquiring model information) including
     * system properties passed as -Dfoo=bar.
     * They may include implicitly immutable system properties like "file.encoding".
     *
     * @since 2.5
     */
    @Incubating
    List<String> getAllJvmArguments();

    /**
     * The system properties the user provided to start the Java process that handles Gradle operations
     * (for example running tasks or acquiring model information).
     *
     * @since 2.5
     */
    @Incubating
    Map<String,String> getSystemProperties();

    /**
     * The effective system properties used to start the Java process that handles Gradle operations
     * (for example running tasks or acquiring model information), including the default system properties.
     *
     * @since 2.5
     */
    @Incubating
    Map<String,String> getEffectiveSystemProperties();
}

@@ -843,19 +843,16 @@
 gs used.
-%0A *
  See exa
@@ -1243,39 +1243,32 @@
 radle operations
-%0A     *
  (for example ru
@@ -1303,39 +1303,32 @@
 el information).
-%0A     *
  The returned ar
@@ -1333,32 +1333,39 @@
 arguments do not
+%0A     *
  include system 
@@ -1387,39 +1387,32 @@
 ed as -Dfoo=bar.
-%0A     *
  They may includ
@@ -1486,23 +1486,16 @@
 ecified,
-%0A     *
  like th
@@ -1532,16 +1532,23 @@
 mon (eg.
+%0A     *
  MaxPerm
@@ -1732,39 +1732,32 @@
 radle operations
-%0A     *
  (for example ru
@@ -1800,23 +1800,16 @@
 mation).
-%0A     *
  The ret
@@ -1830,32 +1830,39 @@
 s do not include
+%0A     *
  system properti
@@ -1876,39 +1876,32 @@
 ed as -Dfoo=bar.
-%0A     *
  They may includ
@@ -2154,39 +2154,32 @@
 radle operations
-%0A     *
  (for example ru
@@ -2231,23 +2231,16 @@
 ncluding
-%0A     *
  system 
@@ -2251,32 +2251,39 @@
 erties passed as
+%0A     *
  -Dfoo=bar.%0A    
@@ -2277,23 +2277,16 @@
 foo=bar.
-%0A     *
  They ma
@@ -2548,39 +2548,32 @@
 radle operations
-%0A     *
  (for example ru
@@ -2673,32 +2673,33 @@
 %0A    Map%3CString,
+ 
 String%3E getSyste
@@ -2822,23 +2822,16 @@
 erations
-%0A     *
  (for ex
@@ -2907,24 +2907,31 @@
 fault system
+%0A     *
  properties.
@@ -2995,16 +2995,17 @@
 %3CString,
+ 
 String%3E 

Make checkstyle happy