langtools/src/share/classes/javax/lang/model/element/NestingKind.java
changeset 17548 b0a4fd89079c
parent 5520 86e4b9a9da40
equal deleted inserted replaced
17547:40f2f9a5a445 17548:b0a4fd89079c
     1 /*
     1 /*
     2  * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2005, 2013, 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
    80  * @author Scott Seligman
    80  * @author Scott Seligman
    81  * @author Peter von der Ahé
    81  * @author Peter von der Ahé
    82  * @since 1.6
    82  * @since 1.6
    83  */
    83  */
    84 public enum NestingKind {
    84 public enum NestingKind {
       
    85     /**
       
    86      * A top-level type, not contained within another type.
       
    87      */
    85     TOP_LEVEL,
    88     TOP_LEVEL,
       
    89 
       
    90     /**
       
    91      * A type that is a named member of another type.
       
    92      */
    86     MEMBER,
    93     MEMBER,
       
    94 
       
    95     /**
       
    96      * A named type declared within a construct other than a type.
       
    97      */
    87     LOCAL,
    98     LOCAL,
       
    99 
       
   100     /**
       
   101      * A type without a name.
       
   102      */
    88     ANONYMOUS;
   103     ANONYMOUS;
    89 
   104 
    90     /**
   105     /**
    91      * Does this constant correspond to a nested type element?
   106      * Does this constant correspond to a nested type element?
    92      * A <i>nested</i> type element is any that is not top-level.
   107      * A <i>nested</i> type element is any that is not top-level.
    93      * An <i>inner</i> type element is any nested type element that
   108      * An <i>inner</i> type element is any nested type element that
    94      * is not {@linkplain Modifier#STATIC static}.
   109      * is not {@linkplain Modifier#STATIC static}.
       
   110      * @return whether or not the constant is nested
    95      */
   111      */
    96     public boolean isNested() {
   112     public boolean isNested() {
    97         return this != TOP_LEVEL;
   113         return this != TOP_LEVEL;
    98     }
   114     }
    99 }
   115 }