langtools/src/share/classes/javax/lang/model/element/ElementKind.java

Print this page




  71     /** A parameter of an exception handler. */
  72     EXCEPTION_PARAMETER,
  73 
  74     // Executables
  75     /** A method. */
  76     METHOD,
  77     /** A constructor. */
  78     CONSTRUCTOR,
  79     /** A static initializer. */
  80     STATIC_INIT,
  81     /** An instance initializer. */
  82     INSTANCE_INIT,
  83 
  84     /** A type parameter. */
  85     TYPE_PARAMETER,
  86 
  87     /**
  88      * An implementation-reserved element.  This is not the element
  89      * you are looking for.
  90      */
  91     OTHER;






  92 
  93 
  94     /**
  95      * Returns {@code true} if this is a kind of class:
  96      * either {@code CLASS} or {@code ENUM}.
  97      *
  98      * @return {@code true} if this is a kind of class
  99      */
 100     public boolean isClass() {
 101         return this == CLASS || this == ENUM;
 102     }
 103 
 104     /**
 105      * Returns {@code true} if this is a kind of interface:
 106      * either {@code INTERFACE} or {@code ANNOTATION_TYPE}.
 107      *
 108      * @return {@code true} if this is a kind of interface
 109      */
 110     public boolean isInterface() {
 111         return this == INTERFACE || this == ANNOTATION_TYPE;


  71     /** A parameter of an exception handler. */
  72     EXCEPTION_PARAMETER,
  73 
  74     // Executables
  75     /** A method. */
  76     METHOD,
  77     /** A constructor. */
  78     CONSTRUCTOR,
  79     /** A static initializer. */
  80     STATIC_INIT,
  81     /** An instance initializer. */
  82     INSTANCE_INIT,
  83 
  84     /** A type parameter. */
  85     TYPE_PARAMETER,
  86 
  87     /**
  88      * An implementation-reserved element.  This is not the element
  89      * you are looking for.
  90      */
  91     OTHER,
  92 
  93     /**
  94      * A resource variable.
  95      * @since 1.7
  96      */
  97     RESOURCE_VARIABLE;
  98 
  99 
 100     /**
 101      * Returns {@code true} if this is a kind of class:
 102      * either {@code CLASS} or {@code ENUM}.
 103      *
 104      * @return {@code true} if this is a kind of class
 105      */
 106     public boolean isClass() {
 107         return this == CLASS || this == ENUM;
 108     }
 109 
 110     /**
 111      * Returns {@code true} if this is a kind of interface:
 112      * either {@code INTERFACE} or {@code ANNOTATION_TYPE}.
 113      *
 114      * @return {@code true} if this is a kind of interface
 115      */
 116     public boolean isInterface() {
 117         return this == INTERFACE || this == ANNOTATION_TYPE;