Package org.jboss.jdeparser
Interface JMethodDef
- All Superinterfaces:
JAnnotatable
,JCommentable
,JDocCommentable
,JGenericDef
A method or constructor definition.
- Author:
- David M. Lloyd
-
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@throws
doc comment block.Get a@throws
doc comment block.Get a@throws
doc 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@return
doc 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 org.jboss.jdeparser.JAnnotatable
annotate, annotate, annotate
Methods inherited from interface org.jboss.jdeparser.JCommentable
blockComment, lineComment
Methods inherited from interface org.jboss.jdeparser.JDocCommentable
deprecated, docComment
Methods inherited from interface org.jboss.jdeparser.JGenericDef
typeParam, typeParams
-
Method Details
-
_default
JBlock _default()A default method body for a JDK 8+ interface method.- Returns:
- the method body
-
_default
A default value for an annotation method.- Parameters:
expr
- the value- Returns:
- this method definition
-
body
JBlock body()Get the method body.- Returns:
- the method body
-
returnsDoc
JComment returnsDoc()Get the@return
doc comment block.- Returns:
- the comment block
-
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
Get a@throws
doc comment block.- Parameters:
type
- the exception type- Returns:
- the doc comment block
-
_throws
Get a@throws
doc comment block.- Parameters:
type
- the exception type- Returns:
- the doc comment block
-
_throws
Get a@throws
doc comment block.- Parameters:
type
- the exception type- Returns:
- the doc comment block
-