Interface JMethodDef
- All Superinterfaces:
JAnnotatable, JCommentable, JDocCommentable, JGenericDef
- All Known Implementing Classes:
AbstractJMethodDef, AnnotationJMethodDef, ConstructorJMethodDef, MethodJMethodDef
A method or constructor definition.
-
Method Summary
Modifier and TypeMethodDescription_default()A default method body for a JDK 8+ interface method.A default value for an annotation method.Get a@throwsdoc comment block.Get a@throwsdoc comment block.Get a@throwsdoc comment block.body()Get the method body.Add a parameter to this method.Add a parameter to this method.Add a parameter to this method.Add a parameter to this method.Add a parameter to this method.Add a parameter to this method.params()Get the list of parameters defined thus far.Get the@returndoc comment block.varargParam(int mods, Class<?> type, String name) Add a vararg parameter to this method.varargParam(int mods, String type, String name) Add a vararg parameter to this method.varargParam(int mods, JType type, String name) Add a vararg parameter to this method.varargParam(Class<?> type, String name) Add a vararg parameter to this method.varargParam(String type, String name) Add a vararg parameter to this method.varargParam(JType type, String name) Add a vararg parameter to this method.Methods inherited from interface JAnnotatable
annotate, annotate, annotateMethods inherited from interface JCommentable
blockComment, lineCommentMethods inherited from interface JDocCommentable
deprecated, docCommentMethods inherited from interface JGenericDef
typeParam, typeParams
-
Method Details
-
_default
-
_default
A default value for an annotation method.- Parameters:
expr- the value- Returns:
- this method definition
-
body
-
returnsDoc
-
param
Add a parameter to this method.- Parameters:
mods- the parameter modifierstype- the parameter typename- the parameter name- Returns:
- the parameter declaration
-
param
Add a parameter to this method.- Parameters:
type- the parameter typename- the parameter name- Returns:
- the parameter declaration
-
param
Add a parameter to this method.- Parameters:
mods- the parameter modifierstype- the parameter typename- the parameter name- Returns:
- the parameter declaration
-
param
Add a parameter to this method.- Parameters:
type- the parameter typename- the parameter name- Returns:
- the parameter declaration
-
param
Add a parameter to this method.- Parameters:
mods- the parameter modifierstype- the parameter typename- the parameter name- Returns:
- the parameter declaration
-
param
Add a parameter to this method.- Parameters:
type- the parameter typename- the parameter name- Returns:
- the parameter declaration
-
varargParam
Add a vararg parameter to this method.- Parameters:
mods- the parameter modifierstype- the parameter typename- the parameter name- Returns:
- the parameter declaration
-
varargParam
Add a vararg parameter to this method.- Parameters:
type- the parameter typename- the parameter name- Returns:
- the parameter declaration
-
varargParam
Add a vararg parameter to this method.- Parameters:
mods- the parameter modifierstype- the parameter typename- the parameter name- Returns:
- the parameter declaration
-
varargParam
Add a vararg parameter to this method.- Parameters:
type- the parameter typename- the parameter name- Returns:
- the parameter declaration
-
varargParam
Add a vararg parameter to this method.- Parameters:
mods- the parameter modifierstype- the parameter typename- the parameter name- Returns:
- the parameter declaration
-
varargParam
Add a vararg parameter to this method.- Parameters:
type- the parameter typename- the parameter name- Returns:
- the parameter declaration
-
params
JParamDeclaration[] params()Get the list of parameters defined thus far.- Returns:
- the parameter list
-
_throws
-
_throws
-
_throws
-