Package org.jboss.jdeparser
Interface JClassDefSection
-
- All Superinterfaces:
JCommentable
- All Known Subinterfaces:
JAnonymousClassDef,JClassDef
- All Known Implementing Classes:
AbstractJClassDef,AnnotationJClassDef,AnonymousJClassDef,EnumConstantJClassDef,EnumJClassDef,ImplJAnonymousClassDef,InnerJAnonymousClassDef,InterfaceJClassDef,JClassDefSectionImpl,PlainJClassDef
public interface JClassDefSection extends JCommentable
A section of a class definition, to which members, comments, and blank lines may be added.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description JClassDef_class(int mods, java.lang.String name)Add a nested class to this type.JClassDef_enum(int mods, java.lang.String name)Add a nested enum to this type.JClassDef_interface(int mods, java.lang.String name)Add a nested interface to this type.JClassDefannotationInterface(int mods, java.lang.String name)Add a nested annotation interface to this type.JClassDefSectionblankLine()Add a blank line at this point of the type.JMethodDefconstructor(int mods)Add a constructor to this type.JVarDeclarationfield(int mods, java.lang.Class<?> type, java.lang.String name)Add a field to this type.JVarDeclarationfield(int mods, java.lang.Class<?> type, java.lang.String name, JExpr init)Add a field to this type.JVarDeclarationfield(int mods, java.lang.String type, java.lang.String name)Add a field to this type.JVarDeclarationfield(int mods, java.lang.String type, java.lang.String name, JExpr init)Add a field to this type.JVarDeclarationfield(int mods, JType type, java.lang.String name)Add a field to this type.JVarDeclarationfield(int mods, JType type, java.lang.String name, JExpr init)Add a field to this type.JBlockinit()Add a "raw" initialization block to this type definition.JMethodDefmethod(int mods, java.lang.Class<?> returnType, java.lang.String name)Add a method to this type.JMethodDefmethod(int mods, java.lang.String returnType, java.lang.String name)Add a method to this type.JMethodDefmethod(int mods, JType returnType, java.lang.String name)Add a method to this type.JClassDefSectionsection()Create a section at this point, into which additional items may be added.JBlockstaticInit()Add a static initialization block to this type definition.-
Methods inherited from interface org.jboss.jdeparser.JCommentable
blockComment, lineComment
-
-
-
-
Method Detail
-
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
JVarDeclaration field(int mods, JType type, java.lang.String name)
Add a field to this type.- Parameters:
mods- the modifierstype- the field typename- the field name- Returns:
- the field declaration
-
field
JVarDeclaration field(int mods, JType type, java.lang.String name, JExpr init)
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
JVarDeclaration field(int mods, java.lang.Class<?> type, java.lang.String name)
Add a field to this type.- Parameters:
mods- the modifierstype- the field typename- the field name- Returns:
- the field declaration
-
field
JVarDeclaration field(int mods, java.lang.Class<?> type, java.lang.String name, JExpr init)
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
JVarDeclaration field(int mods, java.lang.String type, java.lang.String name)
Add a field to this type.- Parameters:
mods- the modifierstype- the field typename- the field name- Returns:
- the field declaration
-
field
JVarDeclaration field(int mods, java.lang.String type, java.lang.String name, JExpr init)
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
JMethodDef method(int mods, JType returnType, java.lang.String name)
Add a method to this type.- Parameters:
mods- the modifiersreturnType- the method return typename- the method name- Returns:
- the method definition
-
method
JMethodDef method(int mods, java.lang.Class<?> returnType, java.lang.String name)
Add a method to this type.- Parameters:
mods- the modifiersreturnType- the method return typename- the method name- Returns:
- the method definition
-
method
JMethodDef method(int mods, java.lang.String returnType, java.lang.String name)
Add a method to this type.- Parameters:
mods- the modifiersreturnType- the method return typename- the method name- Returns:
- the method definition
-
constructor
JMethodDef constructor(int mods)
Add a constructor to this type.- Parameters:
mods- the modifiers- Returns:
- the constructor definition
-
_class
JClassDef _class(int mods, java.lang.String name)
Add a nested class to this type.- Parameters:
mods- the class modifiersname- the class name- Returns:
- the nested class
-
_enum
JClassDef _enum(int mods, java.lang.String name)
Add a nested enum to this type.- Parameters:
mods- the enum modifiersname- the enum name- Returns:
- the nested enum
-
_interface
JClassDef _interface(int mods, java.lang.String name)
Add a nested interface to this type.- Parameters:
mods- the interface modifiersname- the interface name- Returns:
- the nested interface
-
annotationInterface
JClassDef annotationInterface(int mods, java.lang.String name)
Add a nested annotation interface to this type.- Parameters:
mods- the annotation interface modifiersname- the annotation interface name- Returns:
- the nested annotation interface
-
-