< prev index next >

src/java.compiler/share/classes/javax/lang/model/element/Name.java

Print this page




  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package javax.lang.model.element;
  27 
  28 /**
  29  * An immutable sequence of characters.  When created by the same
  30  * implementation, objects implementing this interface must obey the
  31  * general {@linkplain Object#equals equals contract} when compared
  32  * with each other.  Therefore, {@code Name} objects from the same
  33  * implementation are usable in collections while {@code Name}s from
  34  * different implementations may not work properly in collections.
  35  *
  36  * <p>An empty {@code Name} has a length of zero.
  37  *
  38  * <p>In the context of {@linkplain
  39  * javax.annotation.processing.ProcessingEnvironment annotation
  40  * processing}, the guarantees for "the same" implementation must
  41  * include contexts where the {@linkplain javax.annotation.processing
  42  * API mediated} side effects of {@linkplain
  43  * javax.annotation.processing.Processor processors} could be visible
  44  * to each other, including successive annotation processing
  45  * {@linkplain javax.annotation.processing.RoundEnvironment rounds}.
  46  *
  47  * @author Joseph D. Darcy
  48  * @author Scott Seligman
  49  * @author Peter von der Ah&eacute;
  50  * @see javax.lang.model.util.Elements#getName
  51  * @since 1.6
  52  */
  53 public interface Name extends CharSequence {
  54     /**
  55      * Returns {@code true} if the argument represents the same
  56      * name as {@code this}, and {@code false} otherwise.




  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package javax.lang.model.element;
  27 
  28 /**
  29  * An immutable sequence of characters.  When created by the same
  30  * implementation, objects implementing this interface must obey the
  31  * general {@linkplain Object#equals equals contract} when compared
  32  * with each other.  Therefore, {@code Name} objects from the same
  33  * implementation are usable in collections while {@code Name}s from
  34  * different implementations may not work properly in collections.
  35  *
  36  * <p><a id="empty_name">An {@linkplain CharSequence#isEmpty() empty} {@code Name} has a {@linkplain CharSequence#length() length} of zero.</a>
  37  *
  38  * <p>In the context of {@linkplain
  39  * javax.annotation.processing.ProcessingEnvironment annotation
  40  * processing}, the guarantees for "the same" implementation must
  41  * include contexts where the {@linkplain javax.annotation.processing
  42  * API mediated} side effects of {@linkplain
  43  * javax.annotation.processing.Processor processors} could be visible
  44  * to each other, including successive annotation processing
  45  * {@linkplain javax.annotation.processing.RoundEnvironment rounds}.
  46  *
  47  * @author Joseph D. Darcy
  48  * @author Scott Seligman
  49  * @author Peter von der Ah&eacute;
  50  * @see javax.lang.model.util.Elements#getName
  51  * @since 1.6
  52  */
  53 public interface Name extends CharSequence {
  54     /**
  55      * Returns {@code true} if the argument represents the same
  56      * name as {@code this}, and {@code false} otherwise.


< prev index next >