Package javax.tools

Enum StandardLocation

java.lang.Object
java.lang.Enum<StandardLocation>
javax.tools.StandardLocation
All Implemented Interfaces:
Serializable, Comparable<StandardLocation>, Constable, JavaFileManager.Location

public enum StandardLocation
extends Enum<StandardLocation>
implements JavaFileManager.Location
Standard locations of file objects.
Since:
1.6
  • Enum Constant Details

  • Method Details

    • values

      public static StandardLocation[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static StandardLocation valueOf​(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • locationFor

      public static JavaFileManager.Location locationFor​(String name)
      Returns a location object with the given name. The following property must hold: locationFor(x) == locationFor(y) if and only if x.equals(y). The returned location will be an output location if and only if name ends with "_OUTPUT". It will be considered to be a module-oriented location if the name contains the word "MODULE".
      Parameters:
      name - a name
      Returns:
      a location
    • isModuleOrientedLocation

      public boolean isModuleOrientedLocation()
      Indicates if this location is module-oriented location, and therefore expected to contain classes in a module/package/class hierarchy, as compared to a package-oriented location, which is expected to contain classes in a package/class hierarchy. The result of this method is undefined if this is an output location.
      Specified by:
      isModuleOrientedLocation in interface JavaFileManager.Location
      Returns:
      true if this location is expected to contain modules
      Since:
      9