class AnnotationJMethodDef extends MethodJMethodDef
JClassItem.Kind| Modifier and Type | Field and Description |
|---|---|
private JExpr |
defaultVal |
SMART_NAME_SORT| Constructor and Description |
|---|
AnnotationJMethodDef(AbstractJClassDef enclosingClass,
int mods,
JType returnType,
java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
JMethodDef |
_default(JExpr defaultVal)
A default value for an annotation method.
|
JComment |
_throws(JType type)
Get a
@throws doc comment block. |
JBlock |
body()
Get the method body.
|
JParamDeclaration |
param(int mods,
JType type,
java.lang.String name)
Add a parameter to this method.
|
JParamDeclaration |
varargParam(int mods,
JType type,
java.lang.String name)
Add a vararg parameter to this method.
|
(package private) boolean |
writeBody() |
(package private) void |
writePostfix(SourceFileWriter writer) |
getItemKind, getModifiers, getName, getReturnType, hasAllModifiers, hasAnyModifier, write_default, _throws, _throws, clazz, param, param, param, param, param, params, returnsDoc, varargParam, varargParam, varargParam, varargParam, varargParamtypeParam, typeParams, typeParamsToArgs, writeTypeParamsannotate, annotate, annotate, writeAnnotationsdeprecated, docComment, writeDocCommentsblockComment, lineComment, writeCommentsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waittypeParam, typeParamsannotate, annotate, annotatedeprecated, docCommentblockComment, lineCommentprivate JExpr defaultVal
AnnotationJMethodDef(AbstractJClassDef enclosingClass, int mods, JType returnType, java.lang.String name)
public JBlock body()
JMethodDefbody in interface JMethodDefbody in class AbstractJMethodDefpublic JParamDeclaration param(int mods, JType type, java.lang.String name)
JMethodDefparam in interface JMethodDefparam in class AbstractJMethodDefmods - the parameter modifierstype - the parameter typename - the parameter namepublic JParamDeclaration varargParam(int mods, JType type, java.lang.String name)
JMethodDefvarargParam in interface JMethodDefvarargParam in class AbstractJMethodDefmods - the parameter modifierstype - the parameter typename - the parameter namepublic JComment _throws(JType type)
JMethodDef@throws doc comment block._throws in interface JMethodDef_throws in class AbstractJMethodDeftype - the exception typepublic JMethodDef _default(JExpr defaultVal)
JMethodDef_default in interface JMethodDef_default in class AbstractJMethodDefdefaultVal - the valueboolean writeBody()
writeBody in class AbstractJMethodDefvoid writePostfix(SourceFileWriter writer) throws java.io.IOException
writePostfix in class AbstractJMethodDefjava.io.IOException