Interface JClassDef
- All Superinterfaces:
JAnnotatable, JClassDefSection, JCommentable, JDocCommentable, JGenericDef
- All Known Subinterfaces:
JAnonymousClassDef
- All Known Implementing Classes:
AbstractJClassDef, AnnotationJClassDef, AnonymousJClassDef, EnumConstantJClassDef, EnumJClassDef, ImplJAnonymousClassDef, InnerJAnonymousClassDef, InterfaceJClassDef, PlainJClassDef
A type definition, which can be a class, interface, annotation type, etc.
-
Method Summary
Modifier and TypeMethodDescriptionAdd an enum constant.Add anextendstype to this type.Add anextendstype to this type.Add anextendstype to this type._implements(Class<?>... clazz) Add one or moreimplementstype(s) to this type._implements(String... name) Add one or moreimplementstype(s) to this type._implements(JType... type) Add one or moreimplementstype(s) to this type.Add a blank line at this point of the type.Get the erased type corresponding to this type definition.Get a generic type for this type definition, where the type arguments are the same as the type parameters of this type (as defined at the time this method is called).Methods inherited from interface JAnnotatable
annotate, annotate, annotateMethods inherited from interface JClassDefSection
_class, _enum, _interface, annotationInterface, constructor, field, field, field, field, field, field, init, method, method, method, section, staticInitMethods inherited from interface JCommentable
blockComment, lineCommentMethods inherited from interface JDocCommentable
deprecated, docCommentMethods inherited from interface JGenericDef
typeParam, typeParams
-
Method Details
-
blankLine
JClassDef blankLine()Add a blank line at this point of the type.- Specified by:
blankLinein interfaceJClassDefSection- Returns:
- this type definition
-
_extends
-
_extends
-
_extends
-
_implements
-
_implements
-
_implements
-
erasedType
JType erasedType()Get the erased type corresponding to this type definition.- Returns:
- the erased type
-
genericType
JType genericType()Get a generic type for this type definition, where the type arguments are the same as the type parameters of this type (as defined at the time this method is called).- Returns:
- the generic type
-
_enum
Add an enum constant. If the class being defined is not an enum, an exception is thrown.- Parameters:
name- the constant name- Returns:
- the call for enum construction
-