Package org.jboss.jdeparser
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 org.jboss.jdeparser.JAnnotatable
annotate, annotate, annotateMethods inherited from interface org.jboss.jdeparser.JClassDefSection
_class, _enum, _interface, annotationInterface, constructor, field, field, field, field, field, field, init, method, method, method, section, staticInitMethods inherited from interface org.jboss.jdeparser.JCommentable
blockComment, lineCommentMethods inherited from interface org.jboss.jdeparser.JDocCommentable
deprecated, docCommentMethods inherited from interface org.jboss.jdeparser.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
Add anextendstype to this type.- Parameters:
name- the type name- Returns:
- this type definition
-
_extends
Add anextendstype to this type.- Parameters:
type- the type- Returns:
- this type definition
-
_extends
Add anextendstype to this type.- Parameters:
clazz- the type- Returns:
- this type definition
-
_implements
Add one or moreimplementstype(s) to this type.- Parameters:
name- the type name- Returns:
- this type definition
-
_implements
Add one or moreimplementstype(s) to this type.- Parameters:
type- the type- Returns:
- this type definition
-
_implements
Add one or moreimplementstype(s) to this type.- Parameters:
clazz- the type- Returns:
- this type definition
-
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
-