Package org.jboss.jdeparser
Interface JClassDef
- All Superinterfaces:
JAnnotatable
,JClassDefSection
,JCommentable
,JDocCommentable
,JGenericDef
- All Known Subinterfaces:
JAnonymousClassDef
A type definition, which can be a class, interface, annotation type, etc.
- Author:
- David M. Lloyd
-
Method Summary
Modifier and TypeMethodDescriptionAdd an enum constant.Add anextends
type to this type.Add anextends
type to this type.Add anextends
type to this type._implements
(Class<?>... clazz) Add one or moreimplements
type(s) to this type._implements
(String... name) Add one or moreimplements
type(s) to this type._implements
(JType... type) Add one or moreimplements
type(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, annotate
Methods inherited from interface org.jboss.jdeparser.JClassDefSection
_class, _enum, _interface, annotationInterface, constructor, field, field, field, field, field, field, init, method, method, method, section, staticInit
Methods inherited from interface org.jboss.jdeparser.JCommentable
blockComment, lineComment
Methods inherited from interface org.jboss.jdeparser.JDocCommentable
deprecated, docComment
Methods 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:
blankLine
in interfaceJClassDefSection
- Returns:
- this type definition
-
_extends
Add anextends
type to this type.- Parameters:
name
- the type name- Returns:
- this type definition
-
_extends
Add anextends
type to this type.- Parameters:
type
- the type- Returns:
- this type definition
-
_extends
Add anextends
type to this type.- Parameters:
clazz
- the type- Returns:
- this type definition
-
_implements
Add one or moreimplements
type(s) to this type.- Parameters:
name
- the type name- Returns:
- this type definition
-
_implements
Add one or moreimplements
type(s) to this type.- Parameters:
type
- the type- Returns:
- this type definition
-
_implements
Add one or moreimplements
type(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
-