class MethodJMethodDef extends AbstractJMethodDef implements JClassItem
JClassItem.Kind| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
name |
private JType |
returnType |
SMART_NAME_SORT| Constructor and Description |
|---|
MethodJMethodDef(AbstractJClassDef clazz,
int mods,
JType returnType,
java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
JClassItem.Kind |
getItemKind()
Get the kind of item.
|
int |
getModifiers()
Get the modifiers of this item.
|
java.lang.String |
getName()
Get the name of this element, if there is one.
|
(package private) JType |
getReturnType() |
boolean |
hasAllModifiers(int mods)
Determine whether this item has all of the modifiers specified by the given bitwise-OR-joined argument.
|
boolean |
hasAnyModifier(int mods)
Determine whether this item has any of the modifiers specified by the given bitwise-OR-joined argument.
|
void |
write(SourceFileWriter writer) |
_default, _default, _throws, _throws, _throws, body, clazz, param, param, param, param, param, param, params, returnsDoc, varargParam, varargParam, varargParam, varargParam, varargParam, varargParam, writeBody, writePostfixtypeParam, 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 final JType returnType
private final java.lang.String name
MethodJMethodDef(AbstractJClassDef clazz, int mods, JType returnType, java.lang.String name)
JType getReturnType()
public void write(SourceFileWriter writer) throws java.io.IOException
write in interface Writablewrite in class AbstractJMethodDefjava.io.IOExceptionpublic java.lang.String getName()
JClassItemgetName in interface JClassItemnull if there is nonepublic int getModifiers()
JClassItemgetModifiers in interface JClassItemgetModifiers in class AbstractJMethodDefJModpublic JClassItem.Kind getItemKind()
JClassItemgetItemKind in interface JClassItempublic boolean hasAllModifiers(int mods)
JClassItemhasAllModifiers in interface JClassItemmods - the modifier(s)true if all of the modifiers are present, false otherwisepublic boolean hasAnyModifier(int mods)
JClassItemhasAnyModifier in interface JClassItemmods - the modifier(s)true if any if the modifiers are present, false otherwise