Class AbstractJMethodDef
java.lang.Object
org.jboss.jdeparser.BasicJCommentable
org.jboss.jdeparser.AbstractJDocCommentable
org.jboss.jdeparser.BasicJAnnotatable
org.jboss.jdeparser.AbstractJGeneric
org.jboss.jdeparser.AbstractJMethodDef
- All Implemented Interfaces:
ClassContent, JAnnotatable, JCommentable, JDocCommentable, JGenericDef, JMethodDef, Writable
- Direct Known Subclasses:
ConstructorJMethodDef, MethodJMethodDef
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ArrayList<AbstractJType> private BasicJBlockprivate final AbstractJClassDefprivate intprivate ArrayList<ImplJParamDeclaration> -
Constructor Summary
Constructors -
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.private ImplJParamDeclarationadd(ImplJParamDeclaration item) body()Get the method body.(package private) AbstractJClassDefclazz()(package private) intAdd 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.voidwrite(SourceFileWriter writer) (package private) boolean(package private) voidwritePostfix(SourceFileWriter writer) Methods inherited from class AbstractJGeneric
typeParam, typeParams, typeParamsToArgs, writeTypeParamsMethods inherited from class BasicJAnnotatable
annotate, annotate, annotate, writeAnnotationsMethods inherited from class AbstractJDocCommentable
deprecated, docComment, writeDocCommentsMethods inherited from class BasicJCommentable
blockComment, lineComment, writeCommentsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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
-
Field Details
-
clazz
-
mods
private int mods -
params
-
_throws
-
body
-
-
Constructor Details
-
AbstractJMethodDef
AbstractJMethodDef(AbstractJClassDef clazz, int mods)
-
-
Method Details
-
_default
Description copied from interface:JMethodDefA default method body for a JDK 8+ interface method.- Specified by:
_defaultin interfaceJMethodDef- Returns:
- the method body
-
_default
Description copied from interface:JMethodDefA default value for an annotation method.- Specified by:
_defaultin interfaceJMethodDef- Parameters:
expr- the value- Returns:
- this method definition
-
body
Description copied from interface:JMethodDefGet the method body.- Specified by:
bodyin interfaceJMethodDef- Returns:
- the method body
-
returnsDoc
Description copied from interface:JMethodDefGet the@returndoc comment block.- Specified by:
returnsDocin interfaceJMethodDef- Returns:
- the comment block
-
add
-
param
Description copied from interface:JMethodDefAdd a parameter to this method.- Specified by:
paramin interfaceJMethodDef- Parameters:
mods- the parameter modifierstype- the parameter typename- the parameter name- Returns:
- the parameter declaration
-
param
Description copied from interface:JMethodDefAdd a parameter to this method.- Specified by:
paramin interfaceJMethodDef- Parameters:
type- the parameter typename- the parameter name- Returns:
- the parameter declaration
-
param
Description copied from interface:JMethodDefAdd a parameter to this method.- Specified by:
paramin interfaceJMethodDef- Parameters:
mods- the parameter modifierstype- the parameter typename- the parameter name- Returns:
- the parameter declaration
-
param
Description copied from interface:JMethodDefAdd a parameter to this method.- Specified by:
paramin interfaceJMethodDef- Parameters:
type- the parameter typename- the parameter name- Returns:
- the parameter declaration
-
param
Description copied from interface:JMethodDefAdd a parameter to this method.- Specified by:
paramin interfaceJMethodDef- Parameters:
mods- the parameter modifierstype- the parameter typename- the parameter name- Returns:
- the parameter declaration
-
param
Description copied from interface:JMethodDefAdd a parameter to this method.- Specified by:
paramin interfaceJMethodDef- Parameters:
type- the parameter typename- the parameter name- Returns:
- the parameter declaration
-
varargParam
Description copied from interface:JMethodDefAdd a vararg parameter to this method.- Specified by:
varargParamin interfaceJMethodDef- Parameters:
mods- the parameter modifierstype- the parameter typename- the parameter name- Returns:
- the parameter declaration
-
varargParam
Description copied from interface:JMethodDefAdd a vararg parameter to this method.- Specified by:
varargParamin interfaceJMethodDef- Parameters:
type- the parameter typename- the parameter name- Returns:
- the parameter declaration
-
varargParam
Description copied from interface:JMethodDefAdd a vararg parameter to this method.- Specified by:
varargParamin interfaceJMethodDef- Parameters:
mods- the parameter modifierstype- the parameter typename- the parameter name- Returns:
- the parameter declaration
-
varargParam
Description copied from interface:JMethodDefAdd a vararg parameter to this method.- Specified by:
varargParamin interfaceJMethodDef- Parameters:
type- the parameter typename- the parameter name- Returns:
- the parameter declaration
-
varargParam
Description copied from interface:JMethodDefAdd a vararg parameter to this method.- Specified by:
varargParamin interfaceJMethodDef- Parameters:
mods- the parameter modifierstype- the parameter typename- the parameter name- Returns:
- the parameter declaration
-
varargParam
Description copied from interface:JMethodDefAdd a vararg parameter to this method.- Specified by:
varargParamin interfaceJMethodDef- Parameters:
type- the parameter typename- the parameter name- Returns:
- the parameter declaration
-
params
Description copied from interface:JMethodDefGet the list of parameters defined thus far.- Specified by:
paramsin interfaceJMethodDef- Returns:
- the parameter list
-
_throws
Description copied from interface:JMethodDefGet a@throwsdoc comment block.- Specified by:
_throwsin interfaceJMethodDef- Parameters:
type- the exception type- Returns:
- the doc comment block
-
_throws
Description copied from interface:JMethodDefGet a@throwsdoc comment block.- Specified by:
_throwsin interfaceJMethodDef- Parameters:
type- the exception type- Returns:
- the doc comment block
-
_throws
Description copied from interface:JMethodDefGet a@throwsdoc comment block.- Specified by:
_throwsin interfaceJMethodDef- Parameters:
type- the exception type- Returns:
- the doc comment block
-
getModifiers
int getModifiers() -
writeBody
boolean writeBody() -
write
- Specified by:
writein interfaceWritable- Throws:
IOException
-
writePostfix
- Throws:
IOException
-
clazz
AbstractJClassDef clazz()
-