Package org.jboss.jdeparser
Interface JClassDef
-
- All Superinterfaces:
JAnnotatable
,JClassDefSection
,JCommentable
,JDocCommentable
,JGenericDef
- All Known Subinterfaces:
JAnonymousClassDef
public interface JClassDef extends JAnnotatable, JDocCommentable, JGenericDef, JClassDefSection
A type definition, which can be a class, interface, annotation type, etc.- Author:
- David M. Lloyd
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description JEnumConstant
_enum(java.lang.String name)
Add an enum constant.JClassDef
_extends(java.lang.Class<?> clazz)
Add anextends
type to this type.JClassDef
_extends(java.lang.String name)
Add anextends
type to this type.JClassDef
_extends(JType type)
Add anextends
type to this type.JClassDef
_implements(java.lang.Class<?>... clazz)
Add one or moreimplements
type(s) to this type.JClassDef
_implements(java.lang.String... name)
Add one or moreimplements
type(s) to this type.JClassDef
_implements(JType... type)
Add one or moreimplements
type(s) to this type.JClassDef
blankLine()
Add a blank line at this point of the type.JType
erasedType()
Get the erased type corresponding to this type definition.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).-
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 Detail
-
blankLine
JClassDef blankLine()
Add a blank line at this point of the type.- Specified by:
blankLine
in interfaceJClassDefSection
- Returns:
- this type definition
-
_extends
JClassDef _extends(java.lang.String name)
Add anextends
type to this type.- Parameters:
name
- the type name- Returns:
- this type definition
-
_extends
JClassDef _extends(JType type)
Add anextends
type to this type.- Parameters:
type
- the type- Returns:
- this type definition
-
_extends
JClassDef _extends(java.lang.Class<?> clazz)
Add anextends
type to this type.- Parameters:
clazz
- the type- Returns:
- this type definition
-
_implements
JClassDef _implements(java.lang.String... name)
Add one or moreimplements
type(s) to this type.- Parameters:
name
- the type name- Returns:
- this type definition
-
_implements
JClassDef _implements(JType... type)
Add one or moreimplements
type(s) to this type.- Parameters:
type
- the type- Returns:
- this type definition
-
_implements
JClassDef _implements(java.lang.Class<?>... clazz)
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
JEnumConstant _enum(java.lang.String name)
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
-
-