Table of Contents
Java 5 (and hence AspectJ 5) provides explicit support for enumerated types. In the simplest case, you can declare an enumerated type as follows:
public enum ProgrammingLanguages { COBOL,C,JAVA,ASPECTJ }
Enumerated types are just classes, and they can contain method and field declarations, and may implement interfaces. Enums may only have private constructors, and may not be extended.
Enumerated types in Java 5 all implicitly extend the type java.lang.Enum. It is illegal to explicitly declare a subtype of this class.