public interface JClassDefSection extends JCommentable
Modifier and Type | Method and 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.
|
JClassDef |
annotationInterface(int mods,
java.lang.String name)
Add a nested annotation interface to this type.
|
JClassDefSection |
blankLine()
Add a blank line at this point of the type.
|
JMethodDef |
constructor(int mods)
Add a constructor to this type.
|
JVarDeclaration |
field(int mods,
java.lang.Class<?> type,
java.lang.String name)
Add a field to this type.
|
JVarDeclaration |
field(int mods,
java.lang.Class<?> type,
java.lang.String name,
JExpr init)
Add a field to this type.
|
JVarDeclaration |
field(int mods,
JType type,
java.lang.String name)
Add a field to this type.
|
JVarDeclaration |
field(int mods,
JType type,
java.lang.String name,
JExpr init)
Add a field to this type.
|
JVarDeclaration |
field(int mods,
java.lang.String type,
java.lang.String name)
Add a field to this type.
|
JVarDeclaration |
field(int mods,
java.lang.String type,
java.lang.String name,
JExpr init)
Add a field to this type.
|
JBlock |
init()
Add a "raw" initialization block to this type definition.
|
JMethodDef |
method(int mods,
java.lang.Class<?> returnType,
java.lang.String name)
Add a method to this type.
|
JMethodDef |
method(int mods,
JType returnType,
java.lang.String name)
Add a method to this type.
|
JMethodDef |
method(int mods,
java.lang.String returnType,
java.lang.String name)
Add a method to this type.
|
JClassDefSection |
section()
Create a section at this point, into which additional items may be added.
|
JBlock |
staticInit()
Add a static initialization block to this type definition.
|
blockComment, lineComment
JClassDefSection section()
JClassDefSection blankLine()
JBlock init()
JBlock staticInit()
JVarDeclaration field(int mods, JType type, java.lang.String name)
mods
- the modifierstype
- the field typename
- the field nameJVarDeclaration field(int mods, JType type, java.lang.String name, JExpr init)
mods
- the modifierstype
- the field typename
- the field nameinit
- the field assigned valueJVarDeclaration field(int mods, java.lang.Class<?> type, java.lang.String name)
mods
- the modifierstype
- the field typename
- the field nameJVarDeclaration field(int mods, java.lang.Class<?> type, java.lang.String name, JExpr init)
mods
- the modifierstype
- the field typename
- the field nameinit
- the field assigned valueJVarDeclaration field(int mods, java.lang.String type, java.lang.String name)
mods
- the modifierstype
- the field typename
- the field nameJVarDeclaration field(int mods, java.lang.String type, java.lang.String name, JExpr init)
mods
- the modifierstype
- the field typename
- the field nameinit
- the field assigned valueJMethodDef method(int mods, JType returnType, java.lang.String name)
mods
- the modifiersreturnType
- the method return typename
- the method nameJMethodDef method(int mods, java.lang.Class<?> returnType, java.lang.String name)
mods
- the modifiersreturnType
- the method return typename
- the method nameJMethodDef method(int mods, java.lang.String returnType, java.lang.String name)
mods
- the modifiersreturnType
- the method return typename
- the method nameJMethodDef constructor(int mods)
mods
- the modifiersJClassDef _class(int mods, java.lang.String name)
mods
- the class modifiersname
- the class nameJClassDef _enum(int mods, java.lang.String name)
mods
- the enum modifiersname
- the enum nameJClassDef _interface(int mods, java.lang.String name)
mods
- the interface modifiersname
- the interface nameJClassDef annotationInterface(int mods, java.lang.String name)
mods
- the annotation interface modifiersname
- the annotation interface name