Interface JClassDefSection
- All Superinterfaces:
JCommentable
- All Known Subinterfaces:
JAnonymousClassDef, JClassDef
- All Known Implementing Classes:
AbstractJClassDef, AnnotationJClassDef, AnonymousJClassDef, EnumConstantJClassDef, EnumJClassDef, ImplJAnonymousClassDef, InnerJAnonymousClassDef, InterfaceJClassDef, JClassDefSectionImpl, PlainJClassDef
A section of a class definition, to which members, comments, and blank lines may be added.
-
Method Summary
Modifier and TypeMethodDescriptionAdd a nested class to this type.Add a nested enum to this type._interface(int mods, String name) Add a nested interface to this type.annotationInterface(int mods, String name) Add a nested annotation interface to this type.Add a blank line at this point of the type.constructor(int mods) Add a constructor to this type.Add a field to this type.Add a field to this type.Add a field to this type.Add a field to this type.Add a field to this type.Add a field to this type.init()Add a "raw" initialization block to this type definition.Add a method to this type.Add a method to this type.Add a method to this type.section()Create a section at this point, into which additional items may be added.Add a static initialization block to this type definition.Methods inherited from interface JCommentable
blockComment, lineComment
-
Method Details
-
section
JClassDefSection section()Create a section at this point, into which additional items may be added.- Returns:
- the new section to add
-
blankLine
JClassDefSection blankLine()Add a blank line at this point of the type.- Returns:
- this type definition
-
init
JBlock init()Add a "raw" initialization block to this type definition.- Returns:
- the initialization block
-
staticInit
JBlock staticInit()Add a static initialization block to this type definition.- Returns:
- the static initialization block
-
field
Add a field to this type.- Parameters:
mods- the modifierstype- the field typename- the field name- Returns:
- the field declaration
-
field
Add a field to this type.- Parameters:
mods- the modifierstype- the field typename- the field nameinit- the field assigned value- Returns:
- the field declaration
-
field
Add a field to this type.- Parameters:
mods- the modifierstype- the field typename- the field name- Returns:
- the field declaration
-
field
Add a field to this type.- Parameters:
mods- the modifierstype- the field typename- the field nameinit- the field assigned value- Returns:
- the field declaration
-
field
Add a field to this type.- Parameters:
mods- the modifierstype- the field typename- the field name- Returns:
- the field declaration
-
field
Add a field to this type.- Parameters:
mods- the modifierstype- the field typename- the field nameinit- the field assigned value- Returns:
- the field declaration
-
method
Add a method to this type.- Parameters:
mods- the modifiersreturnType- the method return typename- the method name- Returns:
- the method definition
-
method
Add a method to this type.- Parameters:
mods- the modifiersreturnType- the method return typename- the method name- Returns:
- the method definition
-
method
Add a method to this type.- Parameters:
mods- the modifiersreturnType- the method return typename- the method name- Returns:
- the method definition
-
constructor
Add a constructor to this type.- Parameters:
mods- the modifiers- Returns:
- the constructor definition
-
_class
-
_enum
-
_interface
-
annotationInterface
-