Class AnnotationJMethodDef
- All Implemented Interfaces:
ClassContent, JAnnotatable, JClassItem, JCommentable, JDocCommentable, JGenericDef, JMethodDef, Writable
-
Nested Class Summary
Nested classes/interfaces inherited from interface JClassItem
JClassItem.Kind -
Field Summary
FieldsFields inherited from interface 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@throwsdoc 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) voidwritePostfix(SourceFileWriter writer) Methods inherited from class MethodJMethodDef
getItemKind, getModifiers, getName, getReturnType, hasAllModifiers, hasAnyModifier, writeMethods inherited from class AbstractJMethodDef
_default, _throws, _throws, clazz, param, param, param, param, param, params, returnsDoc, varargParam, varargParam, varargParam, varargParam, varargParamMethods 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
-
defaultVal
-
-
Constructor Details
-
AnnotationJMethodDef
AnnotationJMethodDef(AbstractJClassDef enclosingClass, int mods, JType returnType, String name)
-
-
Method Details
-
body
Description copied from interface:JMethodDefGet the method body.- Specified by:
bodyin interfaceJMethodDef- Overrides:
bodyin classAbstractJMethodDef- Returns:
- the method body
-
param
Description copied from interface:JMethodDefAdd a parameter to this method.- Specified by:
paramin interfaceJMethodDef- Overrides:
paramin classAbstractJMethodDef- 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- Overrides:
varargParamin classAbstractJMethodDef- Parameters:
mods- the parameter modifierstype- the parameter typename- the parameter name- Returns:
- the parameter declaration
-
_throws
Description copied from interface:JMethodDefGet a@throwsdoc comment block.- Specified by:
_throwsin interfaceJMethodDef- Overrides:
_throwsin classAbstractJMethodDef- Parameters:
type- the exception type- Returns:
- the doc comment block
-
_default
Description copied from interface:JMethodDefA default value for an annotation method.- Specified by:
_defaultin interfaceJMethodDef- Overrides:
_defaultin classAbstractJMethodDef- Parameters:
defaultVal- the value- Returns:
- this method definition
-
writeBody
boolean writeBody()- Overrides:
writeBodyin classAbstractJMethodDef
-
writePostfix
- Overrides:
writePostfixin classAbstractJMethodDef- Throws:
IOException
-