langtools/src/share/classes/javax/tools/JavaFileManager.java
changeset 25287 d2440361b323
parent 9303 eae35c201e19
equal deleted inserted replaced
25286:09b9113ad68a 25287:d2440361b323
     1 /*
     1 /*
     2  * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   108      * Interface for locations of file objects.  Used by file managers
   108      * Interface for locations of file objects.  Used by file managers
   109      * to determine where to place or search for file objects.
   109      * to determine where to place or search for file objects.
   110      */
   110      */
   111     interface Location {
   111     interface Location {
   112         /**
   112         /**
   113          * Gets the name of this location.
   113          * Returns the name of this location.
   114          *
   114          *
   115          * @return a name
   115          * @return a name
   116          */
   116          */
   117         String getName();
   117         String getName();
   118 
   118 
   125          */
   125          */
   126         boolean isOutputLocation();
   126         boolean isOutputLocation();
   127     }
   127     }
   128 
   128 
   129     /**
   129     /**
   130      * Gets a class loader for loading plug-ins from the given
   130      * Returns a class loader for loading plug-ins from the given
   131      * location.  For example, to load annotation processors, a
   131      * location.  For example, to load annotation processors, a
   132      * compiler will request a class loader for the {@link
   132      * compiler will request a class loader for the {@link
   133      * StandardLocation#ANNOTATION_PROCESSOR_PATH
   133      * StandardLocation#ANNOTATION_PROCESSOR_PATH
   134      * ANNOTATION_PROCESSOR_PATH} location.
   134      * ANNOTATION_PROCESSOR_PATH} location.
   135      *
   135      *
   222      * @return true if the location is known
   222      * @return true if the location is known
   223      */
   223      */
   224     boolean hasLocation(Location location);
   224     boolean hasLocation(Location location);
   225 
   225 
   226     /**
   226     /**
   227      * Gets a {@linkplain JavaFileObject file object} for input
   227      * Returns a {@linkplain JavaFileObject file object} for input
   228      * representing the specified class of the specified kind in the
   228      * representing the specified class of the specified kind in the
   229      * given location.
   229      * given location.
   230      *
   230      *
   231      * @param location a location
   231      * @param location a location
   232      * @param className the name of a class
   232      * @param className the name of a class
   248                                        String className,
   248                                        String className,
   249                                        Kind kind)
   249                                        Kind kind)
   250         throws IOException;
   250         throws IOException;
   251 
   251 
   252     /**
   252     /**
   253      * Gets a {@linkplain JavaFileObject file object} for output
   253      * Returns a {@linkplain JavaFileObject file object} for output
   254      * representing the specified class of the specified kind in the
   254      * representing the specified class of the specified kind in the
   255      * given location.
   255      * given location.
   256      *
   256      *
   257      * <p>Optionally, this file manager might consider the sibling as
   257      * <p>Optionally, this file manager might consider the sibling as
   258      * a hint for where to place the output.  The exact semantics of
   258      * a hint for where to place the output.  The exact semantics of
   286                                         Kind kind,
   286                                         Kind kind,
   287                                         FileObject sibling)
   287                                         FileObject sibling)
   288         throws IOException;
   288         throws IOException;
   289 
   289 
   290     /**
   290     /**
   291      * Gets a {@linkplain FileObject file object} for input
   291      * Returns a {@linkplain FileObject file object} for input
   292      * representing the specified <a href="JavaFileManager.html#relative_name">relative
   292      * representing the specified <a href="JavaFileManager.html#relative_name">relative
   293      * name</a> in the specified package in the given location.
   293      * name</a> in the specified package in the given location.
   294      *
   294      *
   295      * <p>If the returned object represents a {@linkplain
   295      * <p>If the returned object represents a {@linkplain
   296      * JavaFileObject.Kind#SOURCE source} or {@linkplain
   296      * JavaFileObject.Kind#SOURCE source} or {@linkplain
   330                                String packageName,
   330                                String packageName,
   331                                String relativeName)
   331                                String relativeName)
   332         throws IOException;
   332         throws IOException;
   333 
   333 
   334     /**
   334     /**
   335      * Gets a {@linkplain FileObject file object} for output
   335      * Returns a {@linkplain FileObject file object} for output
   336      * representing the specified <a href="JavaFileManager.html#relative_name">relative
   336      * representing the specified <a href="JavaFileManager.html#relative_name">relative
   337      * name</a> in the specified package in the given location.
   337      * name</a> in the specified package in the given location.
   338      *
   338      *
   339      * <p>Optionally, this file manager might consider the sibling as
   339      * <p>Optionally, this file manager might consider the sibling as
   340      * a hint for where to place the output.  The exact semantics of
   340      * a hint for where to place the output.  The exact semantics of