Package org.jboss.jdeparser
Class AnnotationJMethodDef
- All Implemented Interfaces:
ClassContent
,JAnnotatable
,JClassItem
,JCommentable
,JDocCommentable
,JGenericDef
,JMethodDef
,Writable
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jboss.jdeparser.JClassItem
JClassItem.Kind
-
Field Summary
FieldsFields inherited from interface org.jboss.jdeparser.JClassItem
SMART_NAME_SORT
-
Constructor Summary
ConstructorsConstructorDescriptionAnnotationJMethodDef
(AbstractJClassDef enclosingClass, int mods, JType returnType, String name) -
Method Summary
Modifier and TypeMethodDescriptionA default value for an annotation method.Get a@throws
doc comment block.body()
Get the method body.Add a parameter to this method.varargParam
(int mods, JType type, String name) Add a vararg parameter to this method.(package private) boolean
(package private) void
writePostfix
(SourceFileWriter writer) Methods inherited from class org.jboss.jdeparser.MethodJMethodDef
getItemKind, getModifiers, getName, getReturnType, hasAllModifiers, hasAnyModifier, write
Methods inherited from class org.jboss.jdeparser.AbstractJMethodDef
_default, _throws, _throws, clazz, param, param, param, param, param, params, returnsDoc, varargParam, varargParam, varargParam, varargParam, varargParam
Methods inherited from class org.jboss.jdeparser.AbstractJGeneric
typeParam, typeParams, typeParamsToArgs, writeTypeParams
Methods inherited from class org.jboss.jdeparser.BasicJAnnotatable
annotate, annotate, annotate, writeAnnotations
Methods inherited from class org.jboss.jdeparser.AbstractJDocCommentable
deprecated, docComment, writeDocComments
Methods inherited from class org.jboss.jdeparser.BasicJCommentable
blockComment, lineComment, writeComments
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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
-
Field Details
-
defaultVal
-
-
Constructor Details
-
AnnotationJMethodDef
AnnotationJMethodDef(AbstractJClassDef enclosingClass, int mods, JType returnType, String name)
-
-
Method Details
-
body
Description copied from interface:JMethodDef
Get the method body.- Specified by:
body
in interfaceJMethodDef
- Overrides:
body
in classAbstractJMethodDef
- Returns:
- the method body
-
param
Description copied from interface:JMethodDef
Add a parameter to this method.- Specified by:
param
in interfaceJMethodDef
- Overrides:
param
in classAbstractJMethodDef
- Parameters:
mods
- the parameter modifierstype
- the parameter typename
- the parameter name- Returns:
- the parameter declaration
-
varargParam
Description copied from interface:JMethodDef
Add a vararg parameter to this method.- Specified by:
varargParam
in interfaceJMethodDef
- Overrides:
varargParam
in classAbstractJMethodDef
- Parameters:
mods
- the parameter modifierstype
- the parameter typename
- the parameter name- Returns:
- the parameter declaration
-
_throws
Description copied from interface:JMethodDef
Get a@throws
doc comment block.- Specified by:
_throws
in interfaceJMethodDef
- Overrides:
_throws
in classAbstractJMethodDef
- Parameters:
type
- the exception type- Returns:
- the doc comment block
-
_default
Description copied from interface:JMethodDef
A default value for an annotation method.- Specified by:
_default
in interfaceJMethodDef
- Overrides:
_default
in classAbstractJMethodDef
- Parameters:
defaultVal
- the value- Returns:
- this method definition
-
writeBody
boolean writeBody()- Overrides:
writeBody
in classAbstractJMethodDef
-
writePostfix
- Overrides:
writePostfix
in classAbstractJMethodDef
- Throws:
IOException
-