public interface JMethodDef extends JGenericDef, JAnnotatable, JDocCommentable
| Modifier and Type | Method and Description |
|---|---|
JBlock |
_default()
A default method body for a JDK 8+ interface method.
|
JMethodDef |
_default(JExpr expr)
A default value for an annotation method.
|
JComment |
_throws(Class<? extends Throwable> type)
Get a
@throws doc comment block. |
JComment |
_throws(JType type)
Get a
@throws doc comment block. |
JComment |
_throws(String type)
Get a
@throws doc comment block. |
JBlock |
body()
Get the method body.
|
JParamDeclaration |
param(Class<?> type,
String name)
Add a parameter to this method.
|
JParamDeclaration |
param(int mods,
Class<?> type,
String name)
Add a parameter to this method.
|
JParamDeclaration |
param(int mods,
JType type,
String name)
Add a parameter to this method.
|
JParamDeclaration |
param(int mods,
String type,
String name)
Add a parameter to this method.
|
JParamDeclaration |
param(JType type,
String name)
Add a parameter to this method.
|
JParamDeclaration |
param(String type,
String name)
Add a parameter to this method.
|
JParamDeclaration[] |
params()
Get the list of parameters defined thus far.
|
JComment |
returnsDoc()
Get the
@return doc comment block. |
JParamDeclaration |
varargParam(Class<?> type,
String name)
Add a vararg parameter to this method.
|
JParamDeclaration |
varargParam(int mods,
Class<?> type,
String name)
Add a vararg parameter to this method.
|
JParamDeclaration |
varargParam(int mods,
JType type,
String name)
Add a vararg parameter to this method.
|
JParamDeclaration |
varargParam(int mods,
String type,
String name)
Add a vararg parameter to this method.
|
JParamDeclaration |
varargParam(JType type,
String name)
Add a vararg parameter to this method.
|
JParamDeclaration |
varargParam(String type,
String name)
Add a vararg parameter to this method.
|
typeParam, typeParamsannotate, annotate, annotatedeprecated, docCommentblockComment, lineCommentJBlock _default()
JMethodDef _default(JExpr expr)
expr - the valueJBlock body()
JComment returnsDoc()
@return doc comment block.JParamDeclaration param(int mods, JType type, String name)
mods - the parameter modifierstype - the parameter typename - the parameter nameJParamDeclaration param(JType type, String name)
type - the parameter typename - the parameter nameJParamDeclaration param(int mods, String type, String name)
mods - the parameter modifierstype - the parameter typename - the parameter nameJParamDeclaration param(String type, String name)
type - the parameter typename - the parameter nameJParamDeclaration param(int mods, Class<?> type, String name)
mods - the parameter modifierstype - the parameter typename - the parameter nameJParamDeclaration param(Class<?> type, String name)
type - the parameter typename - the parameter nameJParamDeclaration varargParam(int mods, JType type, String name)
mods - the parameter modifierstype - the parameter typename - the parameter nameJParamDeclaration varargParam(JType type, String name)
type - the parameter typename - the parameter nameJParamDeclaration varargParam(int mods, String type, String name)
mods - the parameter modifierstype - the parameter typename - the parameter nameJParamDeclaration varargParam(String type, String name)
type - the parameter typename - the parameter nameJParamDeclaration varargParam(int mods, Class<?> type, String name)
mods - the parameter modifierstype - the parameter typename - the parameter nameJParamDeclaration varargParam(Class<?> type, String name)
type - the parameter typename - the parameter nameJParamDeclaration[] params()
JComment _throws(String type)
@throws doc comment block.type - the exception typeJComment _throws(JType type)
@throws doc comment block.type - the exception typeCopyright © 2019 JBoss by Red Hat. All rights reserved.