public interface JClassDefSection extends JCommentable
Modifier and Type | Method and Description |
---|---|
JClassDef |
_class(int mods,
String name)
Add a nested class to this type.
|
JClassDef |
_enum(int mods,
String name)
Add a nested enum to this type.
|
JClassDef |
_interface(int mods,
String name)
Add a nested interface to this type.
|
JClassDef |
annotationInterface(int mods,
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,
Class<?> type,
String name)
Add a field to this type.
|
JVarDeclaration |
field(int mods,
Class<?> type,
String name,
JExpr init)
Add a field to this type.
|
JVarDeclaration |
field(int mods,
JType type,
String name)
Add a field to this type.
|
JVarDeclaration |
field(int mods,
JType type,
String name,
JExpr init)
Add a field to this type.
|
JVarDeclaration |
field(int mods,
String type,
String name)
Add a field to this type.
|
JVarDeclaration |
field(int mods,
String type,
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,
Class<?> returnType,
String name)
Add a method to this type.
|
JMethodDef |
method(int mods,
JType returnType,
String name)
Add a method to this type.
|
JMethodDef |
method(int mods,
String returnType,
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, String name)
mods
- the modifierstype
- the field typename
- the field nameJVarDeclaration field(int mods, JType type, String name, JExpr init)
mods
- the modifierstype
- the field typename
- the field nameinit
- the field assigned valueJVarDeclaration field(int mods, Class<?> type, String name)
mods
- the modifierstype
- the field typename
- the field nameJVarDeclaration field(int mods, Class<?> type, String name, JExpr init)
mods
- the modifierstype
- the field typename
- the field nameinit
- the field assigned valueJVarDeclaration field(int mods, String type, String name)
mods
- the modifierstype
- the field typename
- the field nameJVarDeclaration field(int mods, String type, String name, JExpr init)
mods
- the modifierstype
- the field typename
- the field nameinit
- the field assigned valueJMethodDef method(int mods, JType returnType, String name)
mods
- the modifiersreturnType
- the method return typename
- the method nameJMethodDef method(int mods, Class<?> returnType, String name)
mods
- the modifiersreturnType
- the method return typename
- the method nameJMethodDef method(int mods, String returnType, String name)
mods
- the modifiersreturnType
- the method return typename
- the method nameJMethodDef constructor(int mods)
mods
- the modifiersJClassDef _class(int mods, String name)
mods
- the class modifiersname
- the class nameJClassDef _enum(int mods, String name)
mods
- the enum modifiersname
- the enum nameJClassDef _interface(int mods, String name)
mods
- the interface modifiersname
- the interface nameCopyright © 2019 JBoss by Red Hat. All rights reserved.