Package org.jboss.jdeparser
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 org.jboss.jdeparser.JAnnotatable
annotate, annotate, annotateMethods inherited from interface org.jboss.jdeparser.JCommentable
blockComment, lineCommentMethods inherited from interface org.jboss.jdeparser.JDocCommentable
deprecated, docCommentMethods 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@returndoc 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@throwsdoc comment block.- Parameters:
type- the exception type- Returns:
- the doc comment block
-
_throws
Get a@throwsdoc comment block.- Parameters:
type- the exception type- Returns:
- the doc comment block
-
_throws
Get a@throwsdoc comment block.- Parameters:
type- the exception type- Returns:
- the doc comment block
-