Is it an enum : Enum « Reflection « Java






Is it an enum



import org.xml.sax.XMLReader;



public class IsEnum {

    public static void main(String[] args) {
        System.out.println(Size.class.isEnum());
        System.out.println(String.class.isEnum());
        System.out.println(String.class.isInstance("Test"));     
        System.out.println(XMLReader.class.isInterface());          
    }
}

enum Size {
  S, M, L, XL, XXL, XXXL;

}

 








Related examples in the same category

1.Get declared methods for enum class
2.Deal with Enum Type in reflection
3.Enum type as class
4.Enum Spy
5.Deal with enum type and its method
6.Deal with enum type field
7.Get and set value of a Enum type field