< prev index next >

src/java.compiler/share/classes/javax/tools/StandardLocation.java

Print this page




  94      * @since 9
  95      */
  96     UPGRADE_MODULE_PATH,
  97 
  98     /**
  99      * Location to search for system modules.
 100      * @spec JPMS
 101      * @since 9
 102      */
 103     SYSTEM_MODULES,
 104 
 105     /**
 106      * Location to search for precompiled user modules.
 107      * @spec JPMS
 108      * @since 9
 109      */
 110     MODULE_PATH,
 111 
 112     /**
 113      * Location to search for module patches.
 114      * @since 9
 115      * @spec JPMS

 116      */
 117     PATCH_MODULE_PATH;
 118 
 119     /**
 120      * Returns a location object with the given name.  The following
 121      * property must hold: {@code locationFor(x) ==
 122      * locationFor(y)} if and only if {@code x.equals(y)}.
 123      * The returned location will be an output location if and only if
 124      * name ends with {@code "_OUTPUT"}. It will be considered to
 125      * be a module-oriented location if the name contains the word
 126      * {@code "MODULE"}.
 127      *
 128      * @param name a name
 129      * @return a location
 130      *
 131      * @revised 9
 132      * @spec JPMS
 133      */
 134     public static Location locationFor(final String name) {
 135         if (locations.isEmpty()) {


 148     }
 149     //where
 150         private static final ConcurrentMap<String,Location> locations
 151             = new ConcurrentHashMap<>();
 152 
 153     @Override
 154     public String getName() { return name(); }
 155 
 156     @Override
 157     public boolean isOutputLocation() {
 158         switch (this) {
 159             case CLASS_OUTPUT:
 160             case SOURCE_OUTPUT:
 161             case NATIVE_HEADER_OUTPUT:
 162                 return true;
 163             default:
 164                 return false;
 165         }
 166     }
 167 




 168     @Override
 169     public boolean isModuleOrientedLocation() {
 170         switch (this) {
 171             case MODULE_SOURCE_PATH:
 172             case ANNOTATION_PROCESSOR_MODULE_PATH:
 173             case UPGRADE_MODULE_PATH:
 174             case SYSTEM_MODULES:
 175             case MODULE_PATH:
 176             case PATCH_MODULE_PATH:
 177                 return true;
 178             default:
 179                 return false;
 180         }
 181     }
 182 }


  94      * @since 9
  95      */
  96     UPGRADE_MODULE_PATH,
  97 
  98     /**
  99      * Location to search for system modules.
 100      * @spec JPMS
 101      * @since 9
 102      */
 103     SYSTEM_MODULES,
 104 
 105     /**
 106      * Location to search for precompiled user modules.
 107      * @spec JPMS
 108      * @since 9
 109      */
 110     MODULE_PATH,
 111 
 112     /**
 113      * Location to search for module patches.

 114      * @spec JPMS
 115      * @since 9
 116      */
 117     PATCH_MODULE_PATH;
 118 
 119     /**
 120      * Returns a location object with the given name.  The following
 121      * property must hold: {@code locationFor(x) ==
 122      * locationFor(y)} if and only if {@code x.equals(y)}.
 123      * The returned location will be an output location if and only if
 124      * name ends with {@code "_OUTPUT"}. It will be considered to
 125      * be a module-oriented location if the name contains the word
 126      * {@code "MODULE"}.
 127      *
 128      * @param name a name
 129      * @return a location
 130      *
 131      * @revised 9
 132      * @spec JPMS
 133      */
 134     public static Location locationFor(final String name) {
 135         if (locations.isEmpty()) {


 148     }
 149     //where
 150         private static final ConcurrentMap<String,Location> locations
 151             = new ConcurrentHashMap<>();
 152 
 153     @Override
 154     public String getName() { return name(); }
 155 
 156     @Override
 157     public boolean isOutputLocation() {
 158         switch (this) {
 159             case CLASS_OUTPUT:
 160             case SOURCE_OUTPUT:
 161             case NATIVE_HEADER_OUTPUT:
 162                 return true;
 163             default:
 164                 return false;
 165         }
 166     }
 167 
 168     /**
 169      * {@inheritDoc}
 170      * @since 9
 171      */
 172     @Override
 173     public boolean isModuleOrientedLocation() {
 174         switch (this) {
 175             case MODULE_SOURCE_PATH:
 176             case ANNOTATION_PROCESSOR_MODULE_PATH:
 177             case UPGRADE_MODULE_PATH:
 178             case SYSTEM_MODULES:
 179             case MODULE_PATH:
 180             case PATCH_MODULE_PATH:
 181                 return true;
 182             default:
 183                 return false;
 184         }
 185     }
 186 }
< prev index next >